3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ } $a = new A(); class B{ public function test($test, $obj = '') { $obj->id = 'test'; } } $b = new B(); $b->test('something', $a); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lmIZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   14     6        INIT_METHOD_CALL                                         !1, 'test'
          7        SEND_VAL_EX                                              'something'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
   15    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class A: [no user functions]
Class B:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lmIZ
function name:  test
number of ops:  5
compiled vars:  !0 = $test, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    9     2        ASSIGN_OBJ                                               !1, 'id'
          3        OP_DATA                                                  'test'
   10     4      > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.87 ms | 1395 KiB | 15 Q