3v4l.org

run code in 500+ PHP versions simultaneously
<?php class User { public function getName() { return "SomeName"; } } $result = [ 'command' => 'getName()' ]; $command = $result['command']; $command = str_replace('()','',$command); $user = new User(); echo $user->{$command}();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OVYAa
function name:  (null)
number of ops:  13
compiled vars:  !0 = $result, !1 = $command, !2 = $user
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                       !0, <array>
   15     1        FETCH_DIM_R                                          ~4      !0, 'command'
          2        ASSIGN                                                       !1, ~4
   16     3        FRAMELESS_ICALL_3                str_replace         ~6      '%28%29', ''
          4        OP_DATA                                                      !1
          5        ASSIGN                                                       !1, ~6
   18     6        NEW                                                  $8      'User'
          7        DO_FCALL                                          0          
          8        ASSIGN                                                       !2, $8
   19     9        INIT_METHOD_CALL                                             !2, !1
         10        DO_FCALL                                          0  $11     
         11        ECHO                                                         $11
         12      > RETURN                                                       1

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

End of function getname

End of class User.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.62 ms | 2175 KiB | 13 Q