View Single Post
Old 02-04-2009, 05:56 AM   #1 (permalink)
planepixel
The Contributor
 
planepixel's Avatar
 
Join Date: Feb 2009
Posts: 28
Thanks: 10
planepixel is on a distinguished road
Default object declaration as class; or class();

Hi.i was reading a tutorial on PHP OOP and came across

two object declaration for same class as follows

PHP Code:
$obj1 = new className;
$obj2 = new className();  //i always used this type 
what is the difference between these declarations. tutorial did not explained this. i am new to php and whatever i have coded i always used $obj2 type declaration and never faced problem.

but now i am confused.
planepixel is offline  
Reply With Quote