3v4l.org

run code in 300+ 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:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FjogPE%3A3%240'
    9     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   11     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'class_exists'
          6        SEND_VAL                                                 'Foo'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FjogPE%3A3%240:
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}
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 function %00%7Bclosure%7D%2Fin%2FjogPE%3A3%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.97 ms | 1395 KiB | 19 Q