3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $format = 'd/m/Y'; //$data = DateTime::createFromFormat($format, time()); $data = new DateTime(); echo $data->format($format); echo "\n"; $data->sub(new DateInterval('P1M')); echo $data->format($format); $dataErr = DateTime::createFromFormat($format, '23/13/2013'); echo "\narray_sum: " print_r(array_sum($dataErr->getLastErrors())); echo "\n"; print_r($dataErr->format($format));
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'print_r' (T_STRING), expecting ',' or ';' in /in/VfOku on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/VfOku on line 11
Process exited with code 255.