3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Privilege { public $mode = 'allow'; } class PrivilegeCall { public function allow() { echo 'allow'; } public function deny() { echo 'deny'; } } $privilege = new Privilege(); $call = new PrivilegeCall(); $call->{$privilege->mode}();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2B93e
function name:  (null)
number of ops:  10
compiled vars:  !0 = $privilege, !1 = $call
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Privilege'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        NEW                                              $5      'PrivilegeCall'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   14     6        FETCH_OBJ_R                                      ~8      !0, 'mode'
          7        INIT_METHOD_CALL                                         !1, ~8
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class Privilege: [no user functions]
Class PrivilegeCall:
Function allow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2B93e
function name:  allow
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'allow'
          1      > RETURN                                                   null

End of function allow

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

End of function deny

End of class PrivilegeCall.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.15 ms | 1394 KiB | 13 Q