3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constant = 'STDOUT'; if (defined($constant) && constant($constant) && ! is_scalar($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 = 9
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 13
Branch analysis from position: 9
filename:       /in/OIBGZ
function name:  (null)
number of ops:  16
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, ->9
          5    >   INIT_FCALL                                               'constant'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        BOOL                                             ~3      $4
          9    > > JMPZ_EX                                          ~3      ~3, ->13
         10    >   TYPE_CHECK                                  124  ~5      !0
         11        BOOL_NOT                                         ~6      ~5
         12        BOOL                                             ~3      ~6
         13    > > JMPZ                                                     ~3, ->15
    5    14    >   ECHO                                                     'Yes%2C+I+am+non-scalar+constant'
    6    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.06 ms | 1395 KiB | 17 Q