3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $seconds = 2; $h = $seconds / 3600 % 24; $m = $seconds / 60 % 60; $s = $seconds % 60; if ($h > 0){ if (strlen(strval($h))) == 1{ $hour = '0'.strval($h); } } if ($m > 0){ if (strlen(strval($m))) == 1{ $minute = '0'.strval($m); } } if ($s > 0){ if (strlen(strval($s))) == 1{ $second = '0'.strval($s); } } $time = $hour.$minute.$second; echo $time;
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected '==' (T_IS_EQUAL) in /in/v2Tgb on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_IS_EQUAL in /in/v2Tgb on line 7
Process exited with code 255.