3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(\Reflection::export(new ReflectionObject(new DateInterval('PT3S'))));
based on AF9eN
Output for 7.1.0
Object of class [ <internal:date> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal:date> static public method __set_state ] { } Method [ <internal:date> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> $time ] } } } - Properties [0] { } - Dynamic properties [16] { Property [ <dynamic> public $y ] Property [ <dynamic> public $m ] Property [ <dynamic> public $d ] Property [ <dynamic> public $h ] Property [ <dynamic> public $i ] Property [ <dynamic> public $s ] Property [ <dynamic> public $f ] Property [ <dynamic> public $weekday ] Property [ <dynamic> public $weekday_behavior ] Property [ <dynamic> public $first_last_day_of ] Property [ <dynamic> public $invert ] Property [ <dynamic> public $days ] Property [ <dynamic> public $special_type ] Property [ <dynamic> public $special_amount ] Property [ <dynamic> public $have_weekday_relative ] Property [ <dynamic> public $have_special_relative ] } - Methods [3] { Method [ <internal:date, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <required> $interval_spec ] } } Method [ <internal:date> public method __wakeup ] { } Method [ <internal:date> public method format ] { - Parameters [1] { Parameter #0 [ <required> $format ] } } } } NULL
Output for 5.6.13 - 5.6.28, 7.0.0 - 7.0.14
Object of class [ <internal:date> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal:date> static public method __set_state ] { } Method [ <internal:date> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> $time ] } } } - Properties [0] { } - Dynamic properties [15] { Property [ <dynamic> public $y ] Property [ <dynamic> public $m ] Property [ <dynamic> public $d ] Property [ <dynamic> public $h ] Property [ <dynamic> public $i ] Property [ <dynamic> public $s ] Property [ <dynamic> public $weekday ] Property [ <dynamic> public $weekday_behavior ] Property [ <dynamic> public $first_last_day_of ] Property [ <dynamic> public $invert ] Property [ <dynamic> public $days ] Property [ <dynamic> public $special_type ] Property [ <dynamic> public $special_amount ] Property [ <dynamic> public $have_weekday_relative ] Property [ <dynamic> public $have_special_relative ] } - Methods [3] { Method [ <internal:date, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <required> $interval_spec ] } } Method [ <internal:date> public method __wakeup ] { } Method [ <internal:date> public method format ] { - Parameters [1] { Parameter #0 [ <required> $format ] } } } } NULL
Output for hhvm-3.10.0 - 3.12.0
Object of class [ <internal:> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [1] { Method [ <internal> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> HH\string $time ] } } } - Properties [0] { } - Methods [4] { Method [ <internal, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <required> HH\string $interval_spec ] } } Method [ <internal> public method __get ] { - Parameters [1] { Parameter #0 [ <required> HH\mixed $member ] } } Method [ <internal> public method __set ] { - Parameters [2] { Parameter #0 [ <required> HH\mixed $member ] Parameter #1 [ <required> HH\mixed $value ] } } Method [ <internal> public method format ] { - Parameters [1] { Parameter #0 [ <required> HH\string $format ] } } } } NULL
Output for 5.3.27 - 5.3.29, 5.4.17 - 5.6.12
Object of class [ <internal:date> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal:date> static public method __set_state ] { } Method [ <internal:date> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> $time ] } } } - Properties [0] { } - Dynamic properties [15] { Property [ <dynamic> public $y ] Property [ <dynamic> public $m ] Property [ <dynamic> public $d ] Property [ <dynamic> public $h ] Property [ <dynamic> public $i ] Property [ <dynamic> public $s ] Property [ <dynamic> public $weekday ] Property [ <dynamic> public $weekday_behavior ] Property [ <dynamic> public $first_last_day_of ] Property [ <dynamic> public $invert ] Property [ <dynamic> public $days ] Property [ <dynamic> public $special_type ] Property [ <dynamic> public $special_amount ] Property [ <dynamic> public $have_weekday_relative ] Property [ <dynamic> public $have_special_relative ] } - Methods [3] { Method [ <internal:date, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <optional> $interval_spec ] } } Method [ <internal:date> public method __wakeup ] { } Method [ <internal:date> public method format ] { - Parameters [1] { Parameter #0 [ <required> $format ] } } } } NULL
Output for 5.3.9 - 5.3.26, 5.4.0 - 5.4.16
Object of class [ <internal:date> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [2] { Method [ <internal:date> static public method __set_state ] { } Method [ <internal:date> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> $time ] } } } - Properties [0] { } - Dynamic properties [8] { Property [ <dynamic> public $y ] Property [ <dynamic> public $m ] Property [ <dynamic> public $d ] Property [ <dynamic> public $h ] Property [ <dynamic> public $i ] Property [ <dynamic> public $s ] Property [ <dynamic> public $invert ] Property [ <dynamic> public $days ] } - Methods [3] { Method [ <internal:date, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <optional> $interval_spec ] } } Method [ <internal:date> public method __wakeup ] { } Method [ <internal:date> public method format ] { - Parameters [1] { Parameter #0 [ <required> $format ] } } } } NULL
Output for 5.3.0 - 5.3.8
Object of class [ <internal:date> class DateInterval ] { - Constants [0] { } - Static properties [0] { } - Static methods [1] { Method [ <internal:date> static public method createFromDateString ] { - Parameters [1] { Parameter #0 [ <required> $time ] } } } - Properties [0] { } - Dynamic properties [8] { Property [ <dynamic> public $y ] Property [ <dynamic> public $m ] Property [ <dynamic> public $d ] Property [ <dynamic> public $h ] Property [ <dynamic> public $i ] Property [ <dynamic> public $s ] Property [ <dynamic> public $invert ] Property [ <dynamic> public $days ] } - Methods [2] { Method [ <internal:date, ctor> public method __construct ] { - Parameters [1] { Parameter #0 [ <optional> $interval_spec ] } } Method [ <internal:date> public method format ] { - Parameters [1] { Parameter #0 [ <required> $format ] } } } } NULL
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/ZutdG on line 4 Fatal error: Class 'DateInterval' not found in /in/ZutdG on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/ZutdG on line 4 Fatal error: Undefined class name 'reflection' in /in/ZutdG on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/ZutdG on line 4 Fatal error: Undefined class name 'reflection' in /in/ZutdG on line 4