3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // This produces errors (in all versions) $a = $x ? $x : $y; // This desn't produce errors (only PHP 7) $aa = $xx ?? $yy;
based on G56Sa
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: x in /in/BSHa9 on line 4 Notice: Undefined variable: y in /in/BSHa9 on line 4 Notice: Undefined variable: yy in /in/BSHa9 on line 7
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/BSHa9 on line 7
Process exited with code 255.