3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateTime{ private $year, $month, $day, $hour, $minute, $second; public function __construct($year, $month, $day, $hour, $minute, $second) { $this->year = $year; $this->month = $month; $this->day = $day; $this->hour = $hour; $this->minute = $minute; $this->second = $second; } public function __debugInfo() { return array( 'date' => $this->year . "-" . $this->month . "-" . $this->day, 'time' => sprintf("%02d:%02d:%02d", $this->hour, $this->minute, $this->second), ); } } var_dump(new MyDateTime(2014, 9, 20, 16, 2, 41)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMTcj
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'var_dump'
          1        NEW                                              $0      'MyDateTime'
          2        SEND_VAL_EX                                              2014
          3        SEND_VAL_EX                                              9
          4        SEND_VAL_EX                                              20
          5        SEND_VAL_EX                                              16
          6        SEND_VAL_EX                                              2
          7        SEND_VAL_EX                                              41
          8        DO_FCALL                                      0          
          9        SEND_VAR                                                 $0
         10        DO_ICALL                                                 
   17    11      > RETURN                                                   1

Class MyDateTime:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMTcj
function name:  __construct
number of ops:  19
compiled vars:  !0 = $year, !1 = $month, !2 = $day, !3 = $hour, !4 = $minute, !5 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
          5        RECV                                             !5      
    5     6        ASSIGN_OBJ                                               'year'
          7        OP_DATA                                                  !0
          8        ASSIGN_OBJ                                               'month'
          9        OP_DATA                                                  !1
         10        ASSIGN_OBJ                                               'day'
         11        OP_DATA                                                  !2
    6    12        ASSIGN_OBJ                                               'hour'
         13        OP_DATA                                                  !3
         14        ASSIGN_OBJ                                               'minute'
         15        OP_DATA                                                  !4
         16        ASSIGN_OBJ                                               'second'
         17        OP_DATA                                                  !5
    7    18      > RETURN                                                   null

End of function __construct

Function __debuginfo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VMTcj
function name:  __debugInfo
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'year'
          1        CONCAT                                           ~1      ~0, '-'
          2        FETCH_OBJ_R                                      ~2      'month'
          3        CONCAT                                           ~3      ~1, ~2
          4        CONCAT                                           ~4      ~3, '-'
          5        FETCH_OBJ_R                                      ~5      'day'
          6        CONCAT                                           ~6      ~4, ~5
          7        INIT_ARRAY                                       ~7      ~6, 'date'
   11     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 '%2502d%3A%2502d%3A%2502d'
         10        FETCH_OBJ_R                                      ~8      'hour'
         11        SEND_VAL                                                 ~8
         12        FETCH_OBJ_R                                      ~9      'minute'
         13        SEND_VAL                                                 ~9
         14        FETCH_OBJ_R                                      ~10     'second'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        ADD_ARRAY_ELEMENT                                ~7      $11, 'time'
         18      > RETURN                                                   ~7
   13    19*     > RETURN                                                   null

End of function __debuginfo

End of class MyDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.7 ms | 1400 KiB | 17 Q