3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! function stringToTimestamp($timestamp) { $newTimestamp = strtotime($timestamp); if ($newTimestamp === FALSE) { return $timestamp; } return $newTimestamp; } print_r(stringToTimestamp("1374366918"));

preferences:
40.15 ms | 402 KiB | 5 Q