views:

35

answers:

1

Why in example 'mytest' isn't an array?

class myclass { 
 public $mytest = array();
}
$insert = new myclass;
$insert -> mytest = Array (15, 50);
+1  A: 

It is an array:

class myclass { 
 public $mytest = array();
}
$insert = new myclass;
$insert -> mytest = Array (15, 50);
echo gettype($insert->mytest); // prints array
webbiedave