3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "45-04-2013"; $s1 = strtok($str,"-"); $s2 = strtok("-"); $s3 = strtok("\n"); echo ("$s1 $s2 $s3"); $num = intval($s2); $num+=4; echo (" $num\n"); echo(strtotime('00:00 +1 hour')); ?>
Output for 5.6.28, 7.0.14 - 7.1.0
45 04 2013 8 1367190000
Output for 7.0.6
45 04 2013 8 1462230000
Output for 5.0.0 - 5.2.17, 5.5.0 - 5.5.34, 5.6.0 - 5.6.20, 7.0.0 - 7.0.5
45 04 2013 8 1460502000
Output for 5.6.21
45 04 2013 8 1462057200
Output for 5.5.35
45 04 2013 8 1463785200
Output for 5.4.0 - 5.4.45
45 04 2013 8 Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/n1RZd on line 14 1460509200
Output for 5.3.0 - 5.3.29
45 04 2013 8 Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /in/n1RZd on line 14 1460502000
Output for 4.4.7 - 4.4.9
45 04 2013 8 1460502051
Output for 4.4.3 - 4.4.6
45 04 2013 8 1460502052
Output for 4.3.11 - 4.4.2
45 04 2013 8 1460502053
Output for 4.3.7 - 4.3.10
45 04 2013 8 1460502054
Output for 4.3.6
45 04 2013 8 1460502055
Output for 4.3.0 - 4.3.5
45 04 2013 8 1460509195