New Help With the [new] operator in a Class Object
Posted: Wed Nov 19, 2014 7:47 am
This is my code:
------------------------------------------------------------
----------------------------------------------------------------
In my php IDE, Eclipse, why am I getting syntax error from using the keyword [NEW] to created a new instance object of ClassA as a private object inside ClassB?
it says, "syntax error, unexpected new"
Any help please.
------------------------------------------------------------
Code: Select all
class ClassB {
private $obj = new ClassA();
} //end of ChessBlock
In my php IDE, Eclipse, why am I getting syntax error from using the keyword [NEW] to created a new instance object of ClassA as a private object inside ClassB?
it says, "syntax error, unexpected new"
Any help please.