3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '(Dec 27, 2013 05:26:29 PST)'; $tz = 'America/Los_Angeles'; preg_match('/^\((.*) PST\)$/', $string, $matches); $string = $matches[1]; $dt = new DateTime($string, new DateTimeZone($tz)); echo $dt->format('U');

preferences:
38.09 ms | 402 KiB | 5 Q