3v4l.org

run code in 300+ PHP versions simultaneously
<?php $field = 'December 22, 2015 at 5:00 AM'; $newfield = date('m/d/Y', strtotime('+1 days', $field) if (date('D', strtotime($field)) == date('D')) { echo 'yes'; } else { echo 'no'; } echo $newfield; echo date('D');
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'if' (T_IF), expecting ',' or ')' in /in/i4eVI on line 4
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'if' (T_IF) in /in/i4eVI on line 4
Process exited with code 255.

preferences:
167.17 ms | 1395 KiB | 25 Q