3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1, 2]; unset($a[1], $a[0]); $b = $a; if (mt_rand(0, 1)) { $a[] = 3; } $b[] = 4; var_dump($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/872qn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        UNSET_DIM                                                !0, 1
          2        UNSET_DIM                                                !0, 0
    5     3        ASSIGN                                                   !1, !0
    7     4        INIT_FCALL                                               'mt_rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $4      
          8      > JMPZ                                                     $4, ->11
    8     9    >   ASSIGN_DIM                                               !0
         10        OP_DATA                                                  3
   10    11    >   ASSIGN_DIM                                               !1
         12        OP_DATA                                                  4
   12    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.59 ms | 1010 KiB | 15 Q