3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('America/Los_Angeles'); $now = new Datetime("2013-04-09 23:45:15",new DateTimeZone("UTC")); $lvLA = new Datetime("2013-04-09 23:44:21",new DateTimeZone('America/Los_Angeles')); $lvUTC = new Datetime("2013-04-09 23:44:21",new DateTimeZone('UTC'); $interval1 = $lvLA->diff($now,true); $interval2 = $lvUTC->diff($now,true); print_r($interval1); print_r($interval2);
Output for 5.3.0 - 5.4.13
Parse error: syntax error, unexpected ';' in /in/ltUpu on line 6
Process exited with code 255.