3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $member_since = new DateTime("1260316800"); $now = new DateTime(); $interval = $date1->diff($now); echo "difference " . $interval->y . " years, " . $interval->m." months, ".$interval->d." days ";
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (1260316800) at position 7 (8): Unexpected character in /in/SoMb6:3 Stack trace: #0 /in/SoMb6(3): DateTime->__construct('1260316800') #1 {main} thrown in /in/SoMb6 on line 3
Process exited with code 255.
Output for 5.2.0 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (1260316800) at position 7 (8): Unexpected character' in /in/SoMb6:3 Stack trace: #0 /in/SoMb6(3): DateTime->__construct('1260316800') #1 {main} thrown in /in/SoMb6 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/SoMb6 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/SoMb6 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/SoMb6 on line 3