3v4l.org

run code in 200+ php & hhvm versions
<?php $start = new DateTimeImmutable('2012-07-01'); $end = new DateTimeImmutable('2012-07-31'); $interval = new DateInterval('P7D'); $recurrences = 4; $periodWithRecurrences = new DatePeriod($start, $interval, $recurrences); $rc = new ReflectionClass($periodWithRecurrences); print_r($rc->getProperties()); $periodWithoutRecurrences = new DatePeriod($start, $interval, $end); $rc = new ReflectionClass($periodWithoutRecurrences); print_r($rc->getProperties());
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.1
Array ( ) Array ( )
Output for hhvm-3.18.4 - 3.21.0
Array ( [0] => ReflectionProperty Object ( [info] => Array ( [name] => start [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => start [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [1] => ReflectionProperty Object ( [info] => Array ( [name] => interval [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => interval [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [2] => ReflectionProperty Object ( [info] => Array ( [name] => end [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => end [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [3] => ReflectionProperty Object ( [info] => Array ( [name] => options [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => options [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [4] => ReflectionProperty Object ( [info] => Array ( [name] => current [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => current [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [5] => ReflectionProperty Object ( [info] => Array ( [name] => recurrances [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => recurrances [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [6] => ReflectionProperty Object ( [info] => Array ( [name] => iterKey [default] => 1 [defaultValue] => 0 [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => iterKey [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) ) Array ( [0] => ReflectionProperty Object ( [info] => Array ( [name] => start [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => start [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [1] => ReflectionProperty Object ( [info] => Array ( [name] => interval [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => interval [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [2] => ReflectionProperty Object ( [info] => Array ( [name] => end [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => end [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [3] => ReflectionProperty Object ( [info] => Array ( [name] => options [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => options [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [4] => ReflectionProperty Object ( [info] => Array ( [name] => current [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => current [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [5] => ReflectionProperty Object ( [info] => Array ( [name] => recurrances [default] => 1 [defaultValue] => [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => recurrances [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) [6] => ReflectionProperty Object ( [info] => Array ( [name] => iterKey [default] => 1 [defaultValue] => 0 [access] => private [accessible] => [modifiers] => 1024 [class] => DatePeriod [doc] => [type] => ) [name] => iterKey [class] => DatePeriod [forceAccessible:ReflectionProperty:private] => ) )