<?php
$dp = new DatePeriod(new DateTime('2010-01-01'), new DateInterval('P1D'), 2);
$r = new ReflectionObject($dp);
$arr = (array)$dp; // cast to array to see the values of propeties
echo "Properties:\r\n";
foreach($r->getProperties() as $v) {
echo $v->getName()."\r\n";
}
echo "\r\n";
echo "Methods:\r\n";
foreach($r->getMethods() as $v) {
echo $v->getName()."\r\n";
}
echo "\r\n";
echo "Array cast:\r\n";
echo strtr(print_r($arr, true), "\0", '_');
- Output for 8.0.0 - 8.0.11
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
getStartDate
getEndDate
getDateInterval
getRecurrences
__wakeup
__set_state
getIterator
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 7.2.29 - 7.2.33, 7.3.12 - 7.3.30, 7.4.0 - 7.4.24
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
__wakeup
__set_state
getStartDate
getEndDate
getDateInterval
getRecurrences
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.6
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
__wakeup
__set_state
getStartDate
getEndDate
getDateInterval
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[f] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 5.6.5 - 5.6.28, 7.0.0 - 7.0.20
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
__wakeup
__set_state
getStartDate
getEndDate
getDateInterval
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 5.4.30 - 5.4.45, 5.5.14 - 5.5.38, 5.6.0 - 5.6.4
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
__wakeup
__set_state
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00.000000
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 5.3.27 - 5.3.29, 5.4.17 - 5.4.29, 5.5.0 - 5.5.13
- Properties:
start
current
end
interval
recurrences
include_start_date
Methods:
__construct
__wakeup
__set_state
Array cast:
Array
(
[start] => DateTime Object
(
[date] => 2010-01-01 00:00:00
[timezone_type] => 3
[timezone] => Europe/Amsterdam
)
[current] =>
[end] =>
[interval] => DateInterval Object
(
[y] => 0
[m] => 0
[d] => 1
[h] => 0
[i] => 0
[s] => 0
[weekday] => 0
[weekday_behavior] => 0
[first_last_day_of] => 0
[invert] => 0
[days] =>
[special_type] => 0
[special_amount] => 0
[have_weekday_relative] => 0
[have_special_relative] => 0
)
[recurrences] => 3
[include_start_date] => 1
)
- Output for 5.3.0 - 5.3.26, 5.4.0 - 5.4.16
- Properties:
Methods:
__construct
Array cast:
Array
(
)
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Fatal error: Class 'DatePeriod' not found in /in/r0mFG on line 3
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: dateperiod in /in/r0mFG on line 3
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Cannot instantiate non-existent class: dateperiod in /in/r0mFG on line 3
preferences:
200.59 ms | 401 KiB | 273 Q