3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($test) && $test != NULL) { echo '$test set and not null\n'; } else { echo '$test not set and not null\n'; } $test = ''; if (isset($test) && $test != NULL) { echo '$test set and not null\n'; } else { echo '$test not set and not null\n'; } if (isset($test)) { echo '$test set, even when null\n'; } $test = "abc"; if (isset($test) && $test != NULL) { echo '$test set and not null\n'; } else { echo '$test not set and not null\n'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 20
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
Branch analysis from position: 20
Branch analysis from position: 13
Branch analysis from position: 7
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/slbQN
function name:  (null)
number of ops:  30
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ISSET_ISEMPTY_CV                                 ~1      !0
          1      > JMPZ_EX                                          ~1      ~1, ->4
          2    >   IS_NOT_EQUAL                                     ~2      !0, null
          3        BOOL                                             ~1      ~2
          4    > > JMPZ                                                     ~1, ->7
    5     5    >   ECHO                                                     '%24test+set+and+not+null%5Cn'
          6      > JMP                                                      ->8
    7     7    >   ECHO                                                     '%24test+not+set+and+not+null%5Cn'
   10     8    >   ASSIGN                                                   !0, ''
   12     9        ISSET_ISEMPTY_CV                                 ~4      !0
         10      > JMPZ_EX                                          ~4      ~4, ->13
         11    >   IS_NOT_EQUAL                                     ~5      !0, null
         12        BOOL                                             ~4      ~5
         13    > > JMPZ                                                     ~4, ->16
   13    14    >   ECHO                                                     '%24test+set+and+not+null%5Cn'
         15      > JMP                                                      ->17
   15    16    >   ECHO                                                     '%24test+not+set+and+not+null%5Cn'
   18    17    >   ISSET_ISEMPTY_CV                                         !0
         18      > JMPZ                                                     ~6, ->20
   19    19    >   ECHO                                                     '%24test+set%2C+even+when+null%5Cn'
   22    20    >   ASSIGN                                                   !0, 'abc'
   24    21        ISSET_ISEMPTY_CV                                 ~8      !0
         22      > JMPZ_EX                                          ~8      ~8, ->25
         23    >   IS_NOT_EQUAL                                     ~9      !0, null
         24        BOOL                                             ~8      ~9
         25    > > JMPZ                                                     ~8, ->28
   25    26    >   ECHO                                                     '%24test+set+and+not+null%5Cn'
         27      > JMP                                                      ->29
   27    28    >   ECHO                                                     '%24test+not+set+and+not+null%5Cn'
   28    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.63 ms | 1399 KiB | 13 Q