3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $day = '2014-06-12' $hour = '10:00:00'; $fData = $day ." " .$hour; $target_time_zone = new DateTimeZone('America/Los_Angeles'); $date_time = new DateTime(now(), $target_time_zone); echo str_replace(":00","",$date_time->format('P'));
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$hour' (T_VARIABLE) in /in/5smZZ on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/5smZZ on line 4
Process exited with code 255.