3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constant = 'STDOUT'; if (defined($constant) && ! is_scalar(constant($constant))) { echo 'Yes, I am non-scalar constant'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 11
filename:       /in/ZQsJH
function name:  (null)
number of ops:  14
compiled vars:  !0 = $constant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'STDOUT'
    4     1        INIT_FCALL                                               'defined'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4      > JMPZ_EX                                          ~3      $2, ->11
          5    >   INIT_FCALL                                               'constant'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        TYPE_CHECK                                  124  ~5      $4
          9        BOOL_NOT                                         ~6      ~5
         10        BOOL                                             ~3      ~6
         11    > > JMPZ                                                     ~3, ->13
    5    12    >   ECHO                                                     'Yes%2C+I+am+non-scalar+constant'
    6    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
297.26 ms | 1394 KiB | 18 Q