3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {public function bar(){}} $instance = new Foo(); $name = 'bar'; $arguments = 'blah'; $instance->{$name}($arguments);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sq6CK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $instance, !1 = $name, !2 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    6     3        ASSIGN                                                   !1, 'bar'
    7     4        ASSIGN                                                   !2, 'blah'
    9     5        INIT_METHOD_CALL                                         !0, !1
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Sq6CK
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.66 ms | 1393 KiB | 13 Q