3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDateTime{ public $year, $month, $day, $hour, $minute, $second; public function __debugInfo() { return $year . "-" . $month;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/0SAZj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $dt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'MyDateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     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
   14     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
   15    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   16    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/0SAZj
function name:  __debugInfo
number of ops:  23
compiled vars:  !0 = $year, !1 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   CONCAT                                           ~2      !0, '-'
          1        CONCAT                                           ~3      ~2, !1
          2      > RETURN                                                   ~3
    6     3*       FETCH_OBJ_R                                      ~4      'year'
          4*       CONCAT                                           ~5      ~4, '-'
          5*       FETCH_OBJ_R                                      ~6      'month'
          6*       CONCAT                                           ~7      ~5, ~6
          7*       CONCAT                                           ~8      ~7, '-'
          8*       FETCH_OBJ_R                                      ~9      'day'
          9*       CONCAT                                           ~10     ~8, ~9
         10*       INIT_ARRAY                                       ~11     ~10, 'date'
    7    11*       INIT_FCALL                                               'sprintf'
         12*       SEND_VAL                                                 '%2502d%3A%2502d%3A%2502d'
         13*       FETCH_OBJ_R                                      ~12     'hour'
         14*       SEND_VAL                                                 ~12
         15*       FETCH_OBJ_R                                      ~13     'minute'
         16*       SEND_VAL                                                 ~13
         17*       FETCH_OBJ_R                                      ~14     'second'
         18*       SEND_VAL                                                 ~14
         19*       DO_ICALL                                         $15     
         20*       ADD_ARRAY_ELEMENT                                ~11     $15, 'time'
         21*       RETURN                                                   ~11
    9    22*     > RETURN                                                   null

End of function __debuginfo

End of class MyDateTime.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.72 ms | 1400 KiB | 17 Q