3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b = (function_exists('define')); if ($b) { define('A', 100); $f = 'define'; $f('B', $f); class A { } } var_dump(method_exists('A', '__constructor'));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/36oV4
function name:  (null)
number of ops:  23
compiled vars:  !0 = $b, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'define'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    5     4      > JMPZ                                                     !0, ->15
    6     5    >   INIT_FCALL                                               'define'
          6        SEND_VAL                                                 'A'
          7        SEND_VAL                                                 100
          8        DO_ICALL                                                 
    8     9        ASSIGN                                                   !1, 'define'
   10    10        INIT_DYNAMIC_CALL                                        !1
         11        SEND_VAL_EX                                              'B'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
   11    14        DECLARE_CLASS                                            'a'
   15    15    >   INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'method_exists'
         17        SEND_VAL                                                 'A'
         18        SEND_VAL                                                 '__constructor'
         19        DO_ICALL                                         $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.08 ms | 1395 KiB | 21 Q