3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (24*60*60*60 < $diff) { // 60 days echo 'week'; } elseif (24*60*60 < $diff) { // 24 hours echo 'day'; } elseif (60*60 < $diff) { // 60 minutes echo 'hour'; } elseif (2*60 < $diff) { // 2 minutes echo 'minute'; } echo 'second'
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/v0m46 on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/v0m46 on line 12
Process exited with code 255.

preferences:
185.11 ms | 1386 KiB | 65 Q