3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function ($c) { if ('ChildClass' === $c) { class ChildClass extends ParentClass {} } if ('ParentClass' === $c) { throw new \Exception('ParentClass not found.'); } }); try { new ChildClass(); } catch (\Exception $e) { echo $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uh8ae
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
   10     2        SEND_VAL                                                 ~1
    3     3        DO_ICALL                                                 
   13     4        NEW                                              $3      'ChildClass'
          5        DO_FCALL                                      0          
          6        FREE                                                     $3
          7      > JMP                                                      ->12
   14     8  E > > CATCH                                       last         'Exception'
   15     9    >   INIT_METHOD_CALL                                         !0, 'getMessage'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
   16    12    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/uh8ae
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_IDENTICAL                                             !0, 'ChildClass'
          2      > JMPZ                                                     ~1, ->4
    5     3    >   DECLARE_CLASS                                            'childclass', 'parentclass'
    7     4    >   IS_IDENTICAL                                             !0, 'ParentClass'
          5      > JMPZ                                                     ~2, ->10
    8     6    >   NEW                                              $3      'Exception'
          7        SEND_VAL_EX                                              'ParentClass+not+found.'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $3
   10    10    > > RETURN                                                   null

End of Dynamic Function 0

Class ChildClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.64 ms | 1452 KiB | 14 Q