3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cached = 'O:10:"DatePeriod":6:{s:5:"start";O:17:"DateTimeImmutable":3:{s:4:"date";s:26:"2024-10-29 09:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:19:"America/Los_Angeles";}s:7:"current";N;s:3:"end";O:17:"DateTimeImmutable":3:{s:4:"date";s:26:"2024-10-29 09:00:00.000000";s:13:"timezone_type";i:3;s:8:"timezone";s:19:"America/Los_Angeles";}s:8:"interval";O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:1;s:1:"h";i:0;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";b:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}s:11:"recurrences";i:1;s:18:"include_start_date";b:1;}'; $obj = unserialize($cached); var_export($obj);
Output for 8.2.4 - 8.2.24, 8.3.0 - 8.3.12
Deprecated: Creation of dynamic property DateInterval::$weekday is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$weekday_behavior is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$first_last_day_of is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$special_type is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$special_amount is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$have_weekday_relative is deprecated in /in/B3RA1 on line 4 Deprecated: Creation of dynamic property DateInterval::$have_special_relative is deprecated in /in/B3RA1 on line 4 Fatal error: Uncaught Error: Invalid serialization data for DatePeriod object in /in/B3RA1:4 Stack trace: #0 [internal function]: DatePeriod->__unserialize(Array) #1 /in/B3RA1(4): unserialize('O:10:"DatePerio...') #2 {main} thrown in /in/B3RA1 on line 4
Process exited with code 255.
Output for 8.2.0 - 8.2.3
Fatal error: Uncaught Error: Invalid serialization data for DatePeriod object in /in/B3RA1:4 Stack trace: #0 [internal function]: DatePeriod->__unserialize(Array) #1 /in/B3RA1(4): unserialize('O:10:"DatePerio...') #2 {main} thrown in /in/B3RA1 on line 4
Process exited with code 255.
Output for 8.1.0 - 8.1.30
DatePeriod::__set_state(array( 'start' => DateTimeImmutable::__set_state(array( 'date' => '2024-10-29 09:00:00.000000', 'timezone_type' => 3, 'timezone' => 'America/Los_Angeles', )), 'current' => NULL, 'end' => DateTimeImmutable::__set_state(array( 'date' => '2024-10-29 09:00:00.000000', 'timezone_type' => 3, 'timezone' => 'America/Los_Angeles', )), 'interval' => DateInterval::__set_state(array( 'y' => 0, 'm' => 0, 'd' => 1, 'h' => 0, 'i' => 0, 's' => 0, 'f' => 0.0, 'weekday' => 0, 'weekday_behavior' => 0, 'first_last_day_of' => 0, 'invert' => 0, 'days' => false, 'special_type' => 0, 'special_amount' => 0, 'have_weekday_relative' => 0, 'have_special_relative' => 0, )), 'recurrences' => 1, 'include_start_date' => true, ))

preferences:
34.18 ms | 411 KiB | 5 Q