3v4l.org

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

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

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.17 ms | 1393 KiB | 13 Q