3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ht = array(1 => 1, 2 => 2, 3 => 3, 4 => 9); $range = range(0,10); Unset($range[0]); // unset 0 since you want 1 as lowest $x = array_intersect_key(array_fill(1,max($ht), "x"), array_flip($ht)); $new = array_replace($range, $x); Echo Implode("", $new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gtSl9
function name:  (null)
number of ops:  31
compiled vars:  !0 = $ht, !1 = $range, !2 = $x, !3 = $new
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'range'
          2        SEND_VAL                                                     0
          3        SEND_VAL                                                     10
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
    5     6        UNSET_DIM                                                    !1, 0
    6     7        INIT_FCALL                                                   'array_intersect_key'
          8        INIT_FCALL                                                   'array_fill'
          9        SEND_VAL                                                     1
         10        INIT_FCALL                                                   'max'
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $7      
         13        SEND_VAR                                                     $7
         14        SEND_VAL                                                     'x'
         15        DO_ICALL                                             $8      
         16        SEND_VAR                                                     $8
         17        INIT_FCALL                                                   'array_flip'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                             $9      
         20        SEND_VAR                                                     $9
         21        DO_ICALL                                             $10     
         22        ASSIGN                                                       !2, $10
    8    23        INIT_FCALL                                                   'array_replace'
         24        SEND_VAR                                                     !1
         25        SEND_VAR                                                     !2
         26        DO_ICALL                                             $12     
         27        ASSIGN                                                       !3, $12
   10    28        FRAMELESS_ICALL_2                implode             ~14     '', !3
         29        ECHO                                                         ~14
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.68 ms | 2026 KiB | 19 Q