3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { function y() { function z(){ echo 'Hello world'; } } } $x = new x; var_dump(function_exists('z')); $x->y(); var_dump(function_exists('z'), z());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uPTkA
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'function_exists'
          5        SEND_VAL                                                 'z'
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   13     9        INIT_METHOD_CALL                                         !0, 'y'
         10        DO_FCALL                                      0          
   14    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'function_exists'
         13        SEND_VAL                                                 'z'
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        INIT_FCALL_BY_NAME                                       'z'
         17        DO_FCALL                                      0  $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00z%2Fin%2FuPTkA%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uPTkA
function name:  z
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Hello+world'
          1      > RETURN                                                   null

End of function %00z%2Fin%2FuPTkA%3A7%240

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

End of function y

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.52 ms | 1396 KiB | 17 Q