ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Object Overloading in PHP 5
Subject:   __construct overloading
Date:   2006-07-24 02:07:36
From:   abc@yahoo.com
why the following code gives error!
<?
class A
{
public function __construct()
{
echo "hye";
}
public function __construct($p)
{
echo $p,"<br />";
}
}
$ob1 = new A(5);
$ob2 = new A();
?>



1 to 1 of 1
1 to 1 of 1