3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isSetTest($value){ global $$value; if ( !isset($$value)){ $$value = NULL; } return $$value; } //Undefined variable here var_dump('name' . isSetTest("value") . "\n"); //Defined variable here $ImDefined = "YES"; var_dump('name' . isSetTest("ImDefined") . "\n");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ebUAB
function name:  (null)
number of ops:  18
compiled vars:  !0 = $ImDefined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'issettest'
          2        SEND_VAL                                                 'value'
          3        DO_FCALL                                      0  $1      
          4        CONCAT                                           ~2      'name', $1
          5        CONCAT                                           ~3      ~2, '%0A'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   17     8        ASSIGN                                                   !0, 'YES'
   18     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'issettest'
         11        SEND_VAL                                                 'ImDefined'
         12        DO_FCALL                                      0  $6      
         13        CONCAT                                           ~7      'name', $6
         14        CONCAT                                           ~8      ~7, '%0A'
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function issettest:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/ebUAB
function name:  isSetTest
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_W                      global lock         $1      !0
          2        FETCH_W                      local               $2      !0
          3        ASSIGN_REF                                               $2, $1
    7     4        ISSET_ISEMPTY_VAR                             4  ~4      !0
          5        BOOL_NOT                                         ~5      ~4
          6      > JMPZ                                                     ~5, ->9
    8     7    >   FETCH_W                      local               $6      !0
          8        ASSIGN                                                   $6, null
   10     9    >   FETCH_R                      local               ~8      !0
         10      > RETURN                                                   ~8
   11    11*     > RETURN                                                   null

End of function issettest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156 ms | 1014 KiB | 16 Q