3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = '[Tue Jun 18 22:25:32 BST 2013] NeoThermic likes B*witched - C"est La Vie'; $bracketpos = strpos($input, '['); $endbracketpos = strpos($input, ']'); $datestamp = substr($input, $bracketpos + 1, $endbracketpos - $bracketpos); $result = strtotime($datestamp); var_dump($datestamp); var_dump($result);
Output for 5.1.0 - 7.1.0
string(29) "Tue Jun 18 22:25:32 BST 2013]" bool(false)
Output for 4.3.0 - 5.0.5
string(29) "Tue Jun 18 22:25:32 BST 2013]" int(-1)