3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('EOL','<br>'); $data='a=1&b=2&c=3'; echo 'global scope',EOL; echo 'parse_data(): ',$data,EOL; parse_str($data); if(isset($b)) { echo 'isset b='.$b,EOL; } else { echo 'no b='.$b,EOL; } echo EOL; echo 'within function',EOL; testme(); function testme() { $data='a=1&b=2&c=3'; echo 'parse_data(): ',$data,EOL; parse_str($data); //echo print_r($b,1); if(isset($b)) { echo 'isset b='.$b,EOL; } else { echo 'notset b='.$b,EOL; } if(isset($b)) { echo 'isset b='.$b,EOL; } else { echo 'no b='.$b,EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWckH
function name:  (null)
number of ops:  34
compiled vars:  !0 = $data, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'EOL'
          2        SEND_VAL                                                 '%3Cbr%3E'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 'a%3D1%26b%3D2%26c%3D3'
    6     5        ECHO                                                     'global+scope'
          6        FETCH_CONSTANT                                   ~4      'EOL'
          7        ECHO                                                     ~4
    7     8        ECHO                                                     'parse_data%28%29%3A+'
          9        ECHO                                                     !0
         10        FETCH_CONSTANT                                   ~5      'EOL'
         11        ECHO                                                     ~5
    8    12        INIT_FCALL                                               'parse_str'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
    9    15        ISSET_ISEMPTY_CV                                         !1
         16      > JMPZ                                                     ~7, ->22
   10    17    >   CONCAT                                           ~8      'isset+b%3D', !1
         18        ECHO                                                     ~8
         19        FETCH_CONSTANT                                   ~9      'EOL'
         20        ECHO                                                     ~9
         21      > JMP                                                      ->26
   13    22    >   CONCAT                                           ~10     'no+b%3D', !1
         23        ECHO                                                     ~10
         24        FETCH_CONSTANT                                   ~11     'EOL'
         25        ECHO                                                     ~11
   15    26    >   FETCH_CONSTANT                                   ~12     'EOL'
         27        ECHO                                                     ~12
   17    28        ECHO                                                     'within+function'
         29        FETCH_CONSTANT                                   ~13     'EOL'
         30        ECHO                                                     ~13
   18    31        INIT_FCALL_BY_NAME                                       'testme'
         32        DO_FCALL                                      0          
   36    33      > RETURN                                                   1

Function testme:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
Branch analysis from position: 26
filename:       /in/aWckH
function name:  testme
number of ops:  31
compiled vars:  !0 = $data, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, 'a%3D1%26b%3D2%26c%3D3'
   21     1        ECHO                                                     'parse_data%28%29%3A+'
          2        ECHO                                                     !0
          3        FETCH_CONSTANT                                   ~3      'EOL'
          4        ECHO                                                     ~3
   22     5        INIT_FCALL                                               'parse_str'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   24     8        ISSET_ISEMPTY_CV                                         !1
          9      > JMPZ                                                     ~5, ->15
   25    10    >   CONCAT                                           ~6      'isset+b%3D', !1
         11        ECHO                                                     ~6
         12        FETCH_CONSTANT                                   ~7      'EOL'
         13        ECHO                                                     ~7
         14      > JMP                                                      ->19
   28    15    >   CONCAT                                           ~8      'notset+b%3D', !1
         16        ECHO                                                     ~8
         17        FETCH_CONSTANT                                   ~9      'EOL'
         18        ECHO                                                     ~9
   30    19    >   ISSET_ISEMPTY_CV                                         !1
         20      > JMPZ                                                     ~10, ->26
   31    21    >   CONCAT                                           ~11     'isset+b%3D', !1
         22        ECHO                                                     ~11
         23        FETCH_CONSTANT                                   ~12     'EOL'
         24        ECHO                                                     ~12
         25      > JMP                                                      ->30
   34    26    >   CONCAT                                           ~13     'no+b%3D', !1
         27        ECHO                                                     ~13
         28        FETCH_CONSTANT                                   ~14     'EOL'
         29        ECHO                                                     ~14
   36    30    > > RETURN                                                   null

End of function testme

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.16 ms | 1400 KiB | 17 Q