3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'A'; $b = 'B'; $minA = 'a'; echo strcmp($a, $b) . PHP_EOL; echo strcmp($a, $minA) . PHP_EOL; $c = $a - $b; $d = $a - $minA; echo $c . PHP_EOL; echo $d . PHP_EOL;
based on GuG4G
Output for 7.1.0
-1 -32 Warning: A non-numeric value encountered in /in/kjsH9 on line 11 Warning: A non-numeric value encountered in /in/kjsH9 on line 11 Warning: A non-numeric value encountered in /in/kjsH9 on line 12 Warning: A non-numeric value encountered in /in/kjsH9 on line 12 0 0
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, 7.0.0 - 7.0.14
-1 -32 0 0
Output for hhvm-3.10.0 - 3.12.0
-1 -1 0 0
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/kjsH9 on line 8 -1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kjsH9 on line 9 -32PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kjsH9 on line 14 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/kjsH9 on line 15 0PHP_EOL