3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $values = array( 0, -0, +0, '0', '-0', '+0', 1, -1, +1, '1', '-1', '+1', 0.0, -0.0, +0.0, '0.0', '-0.0', '+0.0', 1.0, -1.0, +1.0, '1.0', '-1.0', '+1.0', 1e10, '1e10', true, false, PHP_INT_MAX, ~PHP_INT_MAX ); foreach ($values as $value) { echo var_export($value, true), "\n"; }
Output for 7.0.2 - 7.1.0
0 0 0 '0' '-0' '+0' 1 -1 1 '1' '-1' '+1' 0.0 -0.0 0.0 '0.0' '-0.0' '+0.0' 1.0 -1.0 1.0 '1.0' '-1.0' '+1.0' 10000000000.0 '1e10' true false 9223372036854775807 -9223372036854775808
Output for 5.2.2 - 7.0.1
0 0 0 '0' '-0' '+0' 1 -1 1 '1' '-1' '+1' 0 0 0 '0.0' '-0.0' '+0.0' 1 -1 1 '1.0' '-1.0' '+1.0' 10000000000 '1e10' true false 9223372036854775807 -9223372036854775808
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.2.1
0 0 0 '0' '-0' '+0' 1 -1 1 '1' '-1' '+1' 0 0 0 '0.0' '-0.0' '+0.0' 1 -1 1 '1.0' '-1.0' '+1.0' 1.0E+10 '1e10' true false 9223372036854775807 -9223372036854775808
Output for 4.3.3 - 4.3.11, 5.0.0 - 5.0.4
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/qJE60 on line 10 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/qJE60 on line 11 0 0 0 '0' '-0' '+0' 1 -1 1 '1' '-1' '+1' 0 0 0 '0.0' '-0.0' '+0.0' 1 -1 1 '1.0' '-1.0' '+1.0' 1.0E+10 '1e10' true false 'PHP_INT_MAX' '�����������'
Output for 4.3.0 - 4.3.2
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/qJE60 on line 10 Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/qJE60 on line 11 0 0 0 '0' '-0' '+0' 1 -1 1 '1' '-1' '+1' 0 0 0 '0.0' '-0.0' '+0.0' 1 -1 1 '1.0' '-1.0' '+1.0' 1.E+10 '1e10' true false 'PHP_INT_MAX' '�����������'