3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = strtotime('last friday of this month'); $d = new DateTime($date); echo $d->format('Y-m-d');
based on IF8HO
Output for 7.0.20 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1446159600) at position 7 (6): Unexpected character in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1446159600') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 7.0.6
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1464300000) at position 7 (0): Unexpected character in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1464300000') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 7.0.5
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1461880800) at position 8 (0): Unexpected character in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1461880800') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1458860400) at position 8 (0): Unexpected character in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1458860400') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 5.3.27 - 5.4.45, 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1446159600) at position 7 (6): Unexpected character' in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1446159600') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 5.5.24, 5.5.35 - 5.6.7, 5.6.21
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1464300000) at position 7 (0): Unexpected character' in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1464300000') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 5.5.25 - 5.5.29, 5.5.34, 5.6.8 - 5.6.14, 5.6.20
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1461880800) at position 8 (0): Unexpected character' in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1461880800') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 5.5.30 - 5.5.33, 5.6.15 - 5.6.19
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1458860400) at position 8 (0): Unexpected character' in /in/WXrHU:5 Stack trace: #0 /in/WXrHU(5): DateTime->__construct('1458860400') #1 {main} thrown in /in/WXrHU on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.26
8800-11-02