Created
January 9, 2015 10:40
-
-
Save s-shin/68011eec88f83df2550a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 $bar; | |
| function __construct() | |
| { | |
| $this->bar = 'bar'; | |
| } | |
| public function echoFoo() | |
| { | |
| echo 'foo'; | |
| } | |
| public function echoBar() | |
| { | |
| Bar::echoBar(); | |
| } | |
| } | |
| class Bar | |
| { | |
| public function echoBar() | |
| { | |
| echo $this->bar; | |
| } | |
| } | |
| $foo = new Foo(); | |
| $foo->echoFoo(); | |
| $foo->echoBar(); | |
| echo "\n"; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From PHP 5.4, if the error level is E_STRICT, "Strict Standards" warning occurs.