3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject; 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/QnYA5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_NS_FCALL_BY_NAME                                    'MyProject%5Cvar_dump'
          1        SEND_VAR_EX                                              !0
          2        DO_FCALL                                      0          
    5     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   12     6        NEW                                              $3      'Exception'
          7        SEND_VAL_EX                                              'ailed%21'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $3
   16    10*     > RETURN                                                   1

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

End of function myproject%5Cvar_dump

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.61 ms | 1394 KiB | 15 Q