3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(6 => 1, 8 => 1, 9 => 5); $array2 = array(9 => 0, 8 => 0, 7 => 0, 6 => 0, 5 => 0, 4 => 0, 3 => 0, 2 => 0, 1 => 0, 12 => 0, 11 => 0, 10 => 0); $res = array_reverse(array_replace($array2, $array1),true); Var_dump($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Xpc26
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array1, !1 = $array2, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   21     2        INIT_FCALL                                               'array_reverse'
          3        INIT_FCALL                                               'array_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
   23    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.25 ms | 1011 KiB | 16 Q