3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constant = 'NULL'; if (defined($constant) && ! is_scalar(constant($constant)) && ! is_resource(constant($constant))) { echo "Yes, I am non-scalar and non-resource constant!\n";}
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 = 46) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 18
Branch analysis from position: 11
filename:       /in/RBhu8
function name:  (null)
number of ops:  21
compiled vars:  !0 = $constant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'NULL'
    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_EX                                          ~3      ~3, ->18
         12    >   INIT_FCALL                                               'constant'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        TYPE_CHECK                                  512  ~8      $7
         16        BOOL_NOT                                         ~9      ~8
         17        BOOL                                             ~3      ~9
         18    > > JMPZ                                                     ~3, ->20
         19    >   ECHO                                                     'Yes%2C+I+am+non-scalar+and+non-resource+constant%21%0A'
         20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.84 ms | 1395 KiB | 17 Q