3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var = []; for ($i = 0; $i < 100000; $i++) { $var[] = new DateTimeImmutable("2015-08-".$i); }
based on MQAKZ
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTimeImmutable::__construct(): Failed to parse time string (2015-08-32) at position 9 (2): Unexpected character in /in/Fphg6:5 Stack trace: #0 /in/Fphg6(5): DateTimeImmutable->__construct('2015-08-32') #1 {main} thrown in /in/Fphg6 on line 5
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTimeImmutable::__construct(): Failed to parse time string (2015-08-32) at position 9 (2): Unexpected character' in /in/Fphg6:5 Stack trace: #0 /in/Fphg6(5): DateTimeImmutable->__construct('2015-08-32') #1 {main} thrown in /in/Fphg6 on line 5
Process exited with code 255.
Output for 5.4.9 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/Fphg6 on line 5
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Fphg6 on line 3
Process exited with code 255.