3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a() { echo 'A' . PHP_EOL; return FALSE; } function b() { echo 'B' . PHP_EOL; return FALSE; } function c() { echo 'C' . PHP_EOL; return TRUE; } function d() { echo 'D' . PHP_EOL; return FALSE; } function e() { echo 'E' . PHP_EOL; return FALSE; } function f() { echo 'F' . PHP_EOL; return FALSE; } var_dump(a() || b() || c() || d() || e() || f());
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
A B C bool(true)
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7HTLp on line 3 APHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7HTLp on line 4 BPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/7HTLp on line 5 CPHP_EOLbool(true)