3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = array(0); // let the current overflow next($x); // the aliasing here... //$z = &$x; // ... forces this assignment to be executed istantly (no copy-on-write) $y = $x; // $y was reset, but not $x, which makes sense, echo "x: " . current($x) . "\n"; echo "y: " . current($y) . "\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pE1KY
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'next'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    8     4        ASSIGN                                                   !1, !0
   10     5        INIT_FCALL                                               'current'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        CONCAT                                           ~6      'x%3A+', $5
          9        CONCAT                                           ~7      ~6, '%0A'
         10        ECHO                                                     ~7
   11    11        INIT_FCALL                                               'current'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $8      
         14        CONCAT                                           ~9      'y%3A+', $8
         15        CONCAT                                           ~10     ~9, '%0A'
         16        ECHO                                                     ~10
   12    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.16 ms | 1394 KiB | 17 Q