3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "45-04-2013"; $s1 = strtok($str,"-"); $s2 = strtok("-"); $s3 = strtok("\n"); echo ("$s1 $s2 $s3"); $num = intval($s2) +4; echo (" $num\n"); echo(strtotime("12-13-2013)); ?>
Output for 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in s0A2i on line 15
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /in/s0A2i on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.22, 5.3.24
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in s0A2i on line 15
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or T_DOLLAR_OPEN_CURLY_BRACES or T_CURLY_OPEN in /in/s0A2i on line 15
Process exited with code 255.

preferences:
180.07 ms | 1395 KiB | 47 Q