Le 18/01/2011 20:15, Enrico Tröger a écrit :
On Tue, 18 Jan 2011 15:22:48 +0300, Константин wrote:
[…]
Now we have such php code:
<?php class test1{ var $abc;var $test; function test567(){ echo "{$a}"; echo '{$a1}'; } } $hello=new test1(); ?>
so questions:
- is i am right that varType of $hello must be test1? so varType is
the type of variable?
Nope. varType is the type of the variable, e.g. string, integer, list, etc. As far as I know PHP doesn't use strict typing at all, so it's probably best to leave it at NULL.
Well, you are right that PHP variable types are not strict, but in this case it is true that $hello has type "test1", so perhaps it's goodt to set it to this value. However, setting it to another value later in the code would be perfectly valid, and so keeping the type "test1" would be wrong:
$hello = new Test() $hello = 42
Just 2 cents ^^
Cheers, Colomban