3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [0 => 0, 1 => 0, 2 => 8, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 10, 10 => 0, 11 => 0, 12 => 0, 14 => 0, 15 => 0]; $keys = array_keys($a); print_r(array_replace(array_fill(min($keys), max($keys) - min($keys), 999), $a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ik71a
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    6     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'array_replace'
          7        INIT_FCALL                                               'array_fill'
          8        INIT_FCALL                                               'min'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        INIT_FCALL                                               'max'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $6      
         15        INIT_FCALL                                               'min'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18        SUB                                              ~8      $6, $7
         19        SEND_VAL                                                 ~8
         20        SEND_VAL                                                 999
         21        DO_ICALL                                         $9      
         22        SEND_VAR                                                 $9
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        SEND_VAR                                                 $10
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.98 ms | 1016 KiB | 19 Q