3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime('2010-01-25'); $date2 = new DateTime('2010-02-20'); $interval = $date2->diff($date1); $months = ($interval->y * 12) + $interval->m; $months += number_format($interval->d / 30, 1); echo $months;dd
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected end of file in /in/efeLC on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/efeLC on line 10
Process exited with code 255.