3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(0, 1); $array2 = array(&$array1); ob_start(function($str) use(&$array1) { static $i = 0; if ($i++ == 4) { unset($array1[0]); //unset($array1[1]); } return "$i: $str"; }, 1); var_dump($array2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4MIgJ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_ARRAY                                       ~3      !0
          2        ASSIGN                                                   !1, ~3
    6     3        INIT_FCALL                                               'ob_start'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F4MIgJ%3A6%240'
          5        BIND_LEXICAL                                             ~5, !0
   13     6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 1
          8        DO_ICALL                                                 
   15     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F4MIgJ%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/4MIgJ
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $str, !1 = $array1, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    7     2        BIND_STATIC                                              !2
    8     3        POST_INC                                         ~3      !2
          4        IS_EQUAL                                                 ~3, 4
          5      > JMPZ                                                     ~4, ->7
    9     6    >   UNSET_DIM                                                !1, 0
   12     7    >   ROPE_INIT                                     3  ~6      !2
          8        ROPE_ADD                                      1  ~6      ~6, '%3A+'
          9        ROPE_END                                      2  ~5      ~6, !0
         10      > RETURN                                                   ~5
   13    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F4MIgJ%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.6 ms | 1388 KiB | 17 Q