3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(version_compare(PHP_VERSION, '5.2.9') > 0) eval(' class RefCallBugTester { public $bad = true; function __call( $name, $args ) { $old = error_reporting( E_ALL & ~E_WARNING ); call_user_func_array( array( $this, \'checkForBrokenRef\' ), $args ); error_reporting( $old ); } function checkForBrokenRef( &$var ) { if( $var ) $this->bad = false; } function execute() { $var = true; call_user_func_array( array( $this, \'foo\' ), array( &$var ) ); } } $refCallBugTester = new RefCallBugTester(); $refCallBugTester->execute(); if($refCallBugTester->bad) return $error_message; return null; ');
Output for 4.3.0 - 5.3.0, 5.3.2 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Output for 5.3.1
Notice: Undefined variable: error_message in /in/blHfZ(32) : eval()'d code on line 27