3v4l.org

run code in 500+ PHP versions simultaneously
<?php class test1 { public $foo; function get($a) { echo "Test 1: $a\n"; } } class test2 { function get($a) { echo "Test 2: $a\n"; } } $test = new test1(); $test->foo = new test2(); $prop = 'foo'; echo $test->$prop->get('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CBZtU
function name:  (null)
number of ops:  14
compiled vars:  !0 = $test, !1 = $prop
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   NEW                                                  $2      'test1'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   13     3        NEW                                                  $6      'test2'
          4        DO_FCALL                                          0          
          5        ASSIGN_OBJ                                                   !0, 'foo'
          6        OP_DATA                                                      $6
   14     7        ASSIGN                                                       !1, 'foo'
   15     8        FETCH_OBJ_R                                          ~9      !0, !1
          9        INIT_METHOD_CALL                                             ~9, 'get'
         10        SEND_VAL_EX                                                  'test'
         11        DO_FCALL                                          0  $10     
         12        ECHO                                                         $10
         13      > RETURN                                                       1

Class test1:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CBZtU
function name:  get
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        ROPE_INIT                                         3  ~2      'Test+1%3A+'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%0A'
          4        ECHO                                                         ~1
          5      > RETURN                                                       null

End of function get

End of class test1.

Class test2:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CBZtU
function name:  get
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   RECV                                                 !0      
          1        ROPE_INIT                                         3  ~2      'Test+2%3A+'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%0A'
          4        ECHO                                                         ~1
          5      > RETURN                                                       null

End of function get

End of class test2.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.96 ms | 2681 KiB | 13 Q