hi,
in java this is a syntax for creating an object for class.
hello obj=new hello();

where as in php this is the syntax.
$obj = new Java("hello");

now i want to cal constructor with parameters, here the syntax for java.
hello obj=new hello("key");

pls give syntax for the above in php.

thanks and regards.

Any additional arguments you pass the Java() call will be interpreted as arguments.

$obj = new Java("someObject", "arg1");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.