3v4l.org

run code in 300+ PHP versions simultaneously
<?php $di = new DateInterval('P1Y'); $di->invert = 1; // Proper negative date interval var_dump($di)
Output for 5.4.0 - 5.4.24, 5.5.0 - 5.5.8
Parse error: syntax error, unexpected end of file in /in/WnsZZ on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/WnsZZ on line 4
Process exited with code 255.

preferences:
184.9 ms | 1395 KiB | 70 Q