3v4l.org

run code in 300+ PHP versions simultaneously
<?php function x($class) { print "xxx\n"; // gets printed throw new Exception("Class '{$class}' not found"); } spl_autoload_register('x'); try { $a = A::z(); // FATAL ERROR: class 'A' not found // NOTE: // $a = A::$z; - will be correctly caught } catch (Exception $ex) { print "{$ex}\n"; // never gets executed }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cod0t
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 'x'
          2        DO_ICALL                                                 
   10     3        INIT_STATIC_METHOD_CALL                                  'A', 'z'
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !0, $3
          6      > JMP                                                      ->11
   13     7  E > > CATCH                                       last         'Exception'
   14     8    >   NOP                                                      
          9        FAST_CONCAT                                      ~5      !1, '%0A'
         10        ECHO                                                     ~5
   15    11    > > RETURN                                                   1

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/cod0t
function name:  x
number of ops:  10
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'xxx%0A'
    5     2        NEW                                              $1      'Exception'
          3        ROPE_INIT                                     3  ~3      'Class+%27'
          4        ROPE_ADD                                      1  ~3      ~3, !0
          5        ROPE_END                                      2  ~2      ~3, '%27+not+found'
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0          
          8      > THROW                                         0          $1
    6     9*     > RETURN                                                   null

End of function x

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
194.14 ms | 1395 KiB | 15 Q