3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php 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 5.3.0, 5.3.2 - 7.1.0
Output for 5.3.1
Notice: Undefined variable: error_message in /in/eEbSi(31) : eval()'d code on line 27