3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Log{ public static function log(){ echo 'fuck'; } } class Test{ protected $logger; public function setLogger($logger){ $this->logger = $logger; } public function fire(){ $this->logger->log(); } } $test = new Test(); $test->setLogger(Log); $test->fire();
Output for 5.3.0 - 5.4.24
Fatal error: Constructor Log::log() cannot be static in /in/dUSCC on line 6
Process exited with code 255.