3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=4;$b=2; $result; if($y=$a>$b){$result='true';} else{$result='false';} if($y>0)$y=$a; else $y=$b; echo 'result:'.$result."\n"; echo 'output:'.$y;
based on Lmcul
Output for 5.1.0 - 5.3.13, 5.3.15 - 5.6.28, 7.0.0 - 7.1.0
result:true output:4
Output for 5.0.4 - 5.0.5, hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: result in /in/GDTtm on line 3 result:true output:4
Output for 5.3.14

Process exited with code 143.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: result in /in/GDTtm on line 3 result:true output:4