Created
August 24, 2010 17:01
-
-
Save heavenshell/547894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo | |
{ | |
public function Foo() | |
{ | |
var_dump(__METHOD__); | |
} | |
public function __construct() | |
{ | |
var_dump(__METHOD__); | |
} | |
} | |
error_reporting(E_ALL|E_STRICT); | |
$foo = new Foo(); | |
//Strict standards: Redefining already defined constructor for class Foo in /tmp/foo.php on line 9 | |
//string(16) "Foo::__construct" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Foo | |
{ | |
public function __construct() | |
{ | |
var_dump(__METHOD__); | |
} | |
public function Foo() | |
{ | |
var_dump(__METHOD__); | |
} | |
} | |
error_reporting(E_ALL|E_STRICT); | |
$foo = new Foo(); | |
//string(16) "Foo::__construct" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Foo; | |
class Foo | |
{ | |
public function Foo() | |
{ | |
var_dump(__METHOD__); | |
} | |
public function __construct() | |
{ | |
var_dump(__METHOD__); | |
} | |
} | |
error_reporting(E_ALL|E_STRICT); | |
$foo = new Foo(); | |
//string(20) "Foo\Foo::__construct" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment