<?php
$start = new DateTime();
$end = new DateTime('tomorrow');
$middle = ($end->getTimestamp()-$start->getTimestamp())/2;
echo new DateTime('+'.$middle);
Fatal error: Uncaught DateMalformedStringException: Failed to parse time string (+21948) at position 4 (4): Unexpected character in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+21948')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught Exception: Failed to parse time string (+21948) at position 4 (4): Unexpected character in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+21948')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (+21948) at position 4 (4): Unexpected character in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+21948')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 8.0.13
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (+23748) at position 4 (4): Unexpected character in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+23748')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (+21948) at position 4 (4): Unexpected character' in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+21948')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Output for 5.5.13
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (+21947.5) at position 4 (4): Unexpected character' in /in/Ot7nu:7
Stack trace:
#0 /in/Ot7nu(7): DateTime->__construct('+21947.5')
#1 {main}
thrown in /in/Ot7nu on line 7
Process exited with code 255.
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/Ot7nu on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/Ot7nu on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/Ot7nu on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/Ot7nu on line 2