3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "23:22:0"; $array = explode(":", $string); $fill = array_fill(0,count($array), 1); //create new array [1,1,1] $array= array_filter($array); $array= array_replace($fill,$array); Var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/thpfU
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $array, !2 = $fill
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '23%3A22%3A0'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        INIT_FCALL                                               'array_fill'
          7        SEND_VAL                                                 0
          8        COUNT                                            ~6      !1
          9        SEND_VAL                                                 ~6
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    7    13        INIT_FCALL                                               'array_filter'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !1, $9
    8    17        INIT_FCALL                                               'array_replace'
         18        SEND_VAR                                                 !2
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !1, $11
   10    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.58 ms | 1009 KiB | 18 Q