3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constant = 'FALSE'; if (defined($constant) && ! is_scalar(constant($constant)) && ! is_resource(constant($constant)) && constant($constant) !== null) { 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 = 46) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 24
Branch analysis from position: 18
Branch analysis from position: 11
filename:       /in/OiiUR
function name:  (null)
number of ops:  27
compiled vars:  !0 = $constant
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'FALSE'
    5     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_EX                                          ~3      ~3, ->24
         19    >   INIT_FCALL                                               'constant'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        TYPE_CHECK                                  1020  ~11     $10
         23        BOOL                                             ~3      ~11
         24    > > JMPZ                                                     ~3, ->26
         25    >   ECHO                                                     'Yes%2C+I+am+non-scalar+and+non-resource+constant%21%0A'
         26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.4 ms | 1396 KiB | 17 Q