3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public $x; public function __construct($x){$this->x = $x;} } $a = array(new Foo("test")); echo $a[0]->x;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s2RoM
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'Foo'
          1        SEND_VAL_EX                                              'test'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~3      $1
          4        ASSIGN                                                   !0, ~3
    9     5        FETCH_DIM_R                                      ~5      !0, 0
          6        FETCH_OBJ_R                                      ~6      ~5, 'x'
          7        ECHO                                                     ~6
          8      > RETURN                                                   1

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

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.6 ms | 1393 KiB | 13 Q