3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $list['timeadded'] = '01/02/2012 07:40:23'; $dt1 = new DateTime($list['timeadded']); $dt2 = new DateTime(); $dt2->sub(new DateInterval('P7D')); $interval = $dt1->diff($dt2); echo $interval->format('%d days')
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/Ilcm0 on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/Ilcm0 on line 11
Process exited with code 255.