3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hello = (object) ['test' => 1]; test($hello); function test($hello){ $hello->test = 2; } var_dump( $hello );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K7ZSL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    5     2        INIT_FCALL_BY_NAME                                       'test'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
   11     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.09 ms | 1399 KiB | 15 Q