3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval = \DateInterval::createFromDateString('+1 month'); var_dump($interval->days === false); var_dump(unserialize(serialize($interval))->days === false);
Output for 7.2.29 - 7.2.33, 7.3.12 - 7.3.28, 7.4.0 - 7.4.16, 8.0.0 - 8.0.3
bool(true) bool(true)
Output for 5.5.4 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.11
bool(true) bool(false)
Output for 5.3.9 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.3
bool(false) bool(false)
Output for 5.3.0 - 5.3.8
bool(false)
Process exited with code 139.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/RkMGa on line 3 Fatal error: Class 'DateInterval' not found in /in/RkMGa on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/RkMGa on line 3 Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/RkMGa on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/RkMGa on line 3 Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/RkMGa on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/RkMGa on line 3 Parse error: parse error in /in/RkMGa on line 5
Process exited with code 255.