3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 10; $foo = null; $ref = &$foo; do { $ref = array('foo' => 'bar'); $ref = &$ref['foo']; } while (--$x); var_dump($foo);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/DgcpZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x, !1 = $foo, !2 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    3     1        ASSIGN                                                   !1, null
    4     2        ASSIGN_REF                                               !2, !1
    7     3    >   ASSIGN                                                   !2, <array>
    8     4        FETCH_DIM_W                                      $7      !2, 'foo'
          5        ASSIGN_REF                                               !2, $7
    9     6        PRE_DEC                                          ~9      !0
          7      > JMPNZ                                                    ~9, ->3
   11     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.5 ms | 1394 KiB | 15 Q