3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime('31-07-2017'); echo $now->format('d-m-Y'); $now->modify('Monday this week'); $echo $now->format('d-m-Y');
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected '$now' (T_VARIABLE) in /in/BO08X on line 7
Process exited with code 255.

preferences:
173.15 ms | 1395 KiB | 36 Q