3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = str_pad(intval(strval("0219")), 4, 0, STR_PAD_LEFT); $test2 = str_pad(intval(date('my')), 4, 0, STR_PAD_LEFT); $test3 = intval(strval("0717")); $test4 = intval(date('my')); $time1 = mktime(1, 1, 1, intval("08"), 1, intval("17")); $time2 = mktime(1, 1, 1, intval(date('m')), 1, intval(date('y'))); echo $time1; echo "<br/>"; echo $time2; $toto = "0919"; $expiration_time = mktime(1, 1, 1, intval(substr($toto->expiration_date, 0, 2)), 1, intval(substr($toto->expiration_date, 2, 2))); $current_time = mktime(1, 1, 1, intval(date('m')), 1, intval(date('y'))); if ($expiration_time < $current_time)){ echo "KO"; } else{ echo "OK"; } ?>
based on 9DPfT
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.7
Parse error: syntax error, unexpected ')' in /in/iKh9B on line 16
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected ')' in /in/iKh9B:16 Stack trace: #0 {main}
Process exited with code 255.