3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SendGrid { public static function send() { echo "Using SG send method"; } } class ZendGrid { public static function send() { echo "Using ZG send method"; } } class Emailer { public function setSendMethod($method) { $this->send = $method; } } $emailer = new Emailer(); $emailer->setSendMethod(ZendGrid::send); $emailer->send;
based on aTqBu
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Undefined class constant 'send' in /in/BZ7J9:23 Stack trace: #0 {main} thrown in /in/BZ7J9 on line 23
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Couldn't find constant ZendGrid::send in /in/BZ7J9:23 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Undefined class constant 'send' in /in/BZ7J9 on line 23
Process exited with code 255.