3v4l.org

run code in 500+ PHP versions simultaneously
<?php spl_autoload_register(function ($class) { echo 'Class: '.$class."\n"; if ($class === 'Foo') { class Foo implements Bar {} } }); var_dump(class_exists('Foo'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jogPE
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    9     2        SEND_VAL                                                     ~0
    3     3        DO_ICALL                                                     
   11     4        INIT_FCALL                                                   'var_dump'
          5        FRAMELESS_ICALL_1                class_exists        ~2      'Foo'
          6        SEND_VAL                                                     ~2
          7        DO_ICALL                                                     
          8      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/jogPE
function name:  {closure:/in/jogPE:3}
number of ops:  8
compiled vars:  !0 = $class
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        CONCAT                                               ~1      'Class%3A+', !0
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
    6     4        IS_IDENTICAL                                                 !0, 'Foo'
          5      > JMPZ                                                         ~3, ->7
    7     6    >   DECLARE_CLASS                                                'foo'
    9     7    > > RETURN                                                       null

End of Dynamic Function 0

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
211.48 ms | 2721 KiB | 10 Q