3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = new class { public $foo = 'foo'; }; function change($a) { $a->foo = 'bar'; } change($a); echo $a->foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsf4s
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                                   <unknown> 
          1        NEW                                                  $2      $1
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
   11     4        INIT_FCALL                                                   'change'
          5        SEND_VAR                                                     !0
          6        DO_FCALL                                          0          
   13     7        FETCH_OBJ_R                                          ~6      !0, 'foo'
          8        ECHO                                                         ~6
   14     9      > RETURN                                                       1

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

End of function change

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
199.76 ms | 2006 KiB | 14 Q