3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject; $query = 'query'; var_dump($query); // Overloaded \var_dump($query); // Internal // We want to access the global Exception class // The following will not work because there's no class called Exception in the MyProject\Database namespace and unqualified class names do not have a fallback to global space // throw new Exception('Query failed!'); // Instead, we use a single backslash to indicate we want to resolve from global space throw new \Exception('ailed!'); function var_dump() { echo 'Overloaded global var_dump()!<br />'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YhZlo
function name:  (null)
number of ops:  12
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'query'
    8     1        INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    9     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   16     7        NEW                                              $4      'Exception'
          8        SEND_VAL_EX                                              'ailed%21'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $4
   20    11*     > RETURN                                                   1

Function myproject%5Cvar_dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YhZlo
function name:  MyProject\var_dump
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     'Overloaded+global+var_dump%28%29%21%3Cbr+%2F%3E'
   20     1      > RETURN                                                   null

End of function myproject%5Cvar_dump

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.45 ms | 1394 KiB | 15 Q