3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obj { public $num; public function __construct($num) { $this->num = $num; } } $arr = array(new Obj(1),new Obj(2)); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7MhY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'Obj'
          1        SEND_VAL_EX                                              1
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~3      $1
          4        NEW                                              $4      'Obj'
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~3      $4
          8        ASSIGN                                                   !0, ~3
   12     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Obj:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d7MhY
function name:  __construct
number of ops:  4
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN_OBJ                                               'num'
          2        OP_DATA                                                  !0
    7     3      > RETURN                                                   null

End of function __construct

End of class Obj.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.36 ms | 1395 KiB | 15 Q