3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = 1; $result ? $x = 1 && $y = 2 : $x = 2; if (isset($x)) { echo "x = " . $x, PHP_EOL; } if (isset($y)) { echo "y = " . $y, PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
x = 1 y = 2
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
x = 1 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/KkMQ4 on line 9 PHP_EOLy = 2 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/KkMQ4 on line 14 PHP_EOL