3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ['7.2.0-RC2', '7.2.0', '7.2.1', '7.1.0-RC2', '7.1.0', '7.1.5', '5.6.3']; foreach ($a as $version) { var_dump( version_compare($a, '7.2.0', '<'), version_compare($a, '7.1', '>') ); } ?>
Output for 5.6.0 - 5.6.30, hhvm-3.18.5, 7.0.0 - 7.1.10
Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 5 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 6 NULL NULL
Output for hhvm-3.22.0
Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line -1 NULL NULL
Output for hhvm-3.21.3
Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 Warning: version_compare() expects parameter 1 to be string, array given in /in/BFfN9 on line 7 NULL NULL