3v4l.org

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

Class MyDateTime:
Function __debuginfo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1D7qB
function name:  __debugInfo
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     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'
    8     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
   10    19*     > RETURN                                                   null

End of function __debuginfo

End of class MyDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.56 ms | 1396 KiB | 17 Q