3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = $_GET['bar'] ?? 'hello'; echo $foo . "\n"; $_GET['bar'] = 'good bye'; $foo = $_GET['bar'] ?? 'hello'; echo $foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0CfbE
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~1      '_GET'
          1        FETCH_DIM_IS                                     ~2      ~1, 'bar'
          2        COALESCE                                         ~3      ~2
          3        QM_ASSIGN                                        ~3      'hello'
          4        ASSIGN                                                   !0, ~3
    3     5        CONCAT                                           ~5      !0, '%0A'
          6        ECHO                                                     ~5
    4     7        FETCH_W                      global              $6      '_GET'
          8        ASSIGN_DIM                                               $6, 'bar'
          9        OP_DATA                                                  'good+bye'
    5    10        FETCH_IS                                         ~8      '_GET'
         11        FETCH_DIM_IS                                     ~9      ~8, 'bar'
         12        COALESCE                                         ~10     ~9
         13        QM_ASSIGN                                        ~10     'hello'
         14        ASSIGN                                                   !0, ~10
    6    15        ECHO                                                     !0
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.09 ms | 1393 KiB | 13 Q