3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = explode('.', $date); var_dump((int)$arr[0]); echo '<br/>'; var_dump((int)$arr[1]); echo '<br/>'; var_dump((int)$arr[2]); echo '<br/>'; echo mktime(0, 0, 0, (int)$arr[1], (int)$arr[0], (int)$arr[2]); echo '<br/>'; echo mktime(0, 0, 0, 0, 0, 0); echo '<br/>';
Output for 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: date in /in/vpmE7 on line 3 int(0) <br/> Notice: Undefined offset: 1 in /in/vpmE7 on line 7 int(0) <br/> Notice: Undefined offset: 2 in /in/vpmE7 on line 9 int(0) <br/> Notice: Undefined offset: 1 in /in/vpmE7 on line 12 Notice: Undefined offset: 2 in /in/vpmE7 on line 12 943916400<br/>943916400<br/>
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: date in /in/vpmE7 on line 3 int(0) <br/> Notice: Undefined index: 1 in /in/vpmE7 on line 7 int(0) <br/> Notice: Undefined index: 2 in /in/vpmE7 on line 9 int(0) <br/> Notice: Undefined index: 1 in /in/vpmE7 on line 12 Notice: Undefined index: 2 in /in/vpmE7 on line 12 943916400<br/>943916400<br/>
Output for 5.4.0 - 5.4.45
int(0) <br/>int(0) <br/>int(0) <br/> Warning: mktime(): 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/vpmE7 on line 12 943920000<br/> Warning: mktime(): 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/vpmE7 on line 14 943920000<br/>
Output for 5.3.0 - 5.3.29
int(0) <br/>int(0) <br/>int(0) <br/> Warning: mktime(): 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/vpmE7 on line 12 943916400<br/> Warning: mktime(): 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/vpmE7 on line 14 943916400<br/>
Output for 5.1.0 - 5.2.17
int(0) <br/>int(0) <br/>int(0) <br/>943916400<br/>943916400<br/>
Output for 4.3.0 - 5.0.5
int(0) <br/>int(0) <br/>int(0) <br/>-1<br/>-1<br/>