Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created April 9, 2014 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayleedev/10276777 to your computer and use it in GitHub Desktop.
Save bayleedev/10276777 to your computer and use it in GitHub Desktop.
<?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