Created
April 9, 2014 14:27
-
-
Save bayleedev/10276777 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 Object { | |
} | |
class Unit extends Object { | |
public $me = null; | |
public function __construct() { | |
$this->me = new Me(); | |
} | |
public function go() { | |
Me::message(); | |
} | |
} | |
class Me extends Object { | |
public function message() { | |
$this->send("Hello world!"); | |
} | |
public function send($msg) { | |
echo $msg . PHP_EOL; | |
} | |
} | |
$unit = new Unit(); | |
$unit->go(); // Fatal error: Call to undefined method Unit::send() in /vagrant/apps/vitals/app/webroot/index.php on line 26 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment