Are we allowed to instantiate a user defined class in another user defined class?
For example:
<?php
class class1{
insert stuff here
}
class class2{
$someVar = new class1;
}
?>
I've tried something similar in my coding, but i keep getting the error:
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in c:\inetpub\wwwroot\ah1\class_item.php on line 92
Thanks
Leon