3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arrays = [ ["Alberto"], ["Alberto", "Bianca"], ["Alberto", "Bianca", "Claudio"], ["Alberto", "Bianca", "Claudio", "Douglas"], ["Alberto", "Bianca", "Claudio", "Douglas", "Erica"] ]; foreach ($arrays as $array) { $original = $array; array_push($array, ...array_splice($array, 0, count($array) / 2)); var_export(array_combine($original,$array)); echo "\n---\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 25
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 25
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/kXkiE
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arrays, !1 = $array, !2 = $original
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   11     1      > FE_RESET_R                                           $4      !0, ->25
          2    > > FE_FETCH_R                                                   $4, !1, ->25
   12     3    >   ASSIGN                                                       !2, !1
   13     4        INIT_FCALL                                                   'array_push'
          5        SEND_REF                                                     !1
          6        INIT_FCALL                                                   'array_splice'
          7        SEND_REF                                                     !1
          8        SEND_VAL                                                     0
          9        COUNT                                                ~6      !1
         10        DIV                                                  ~7      ~6, 2
         11        SEND_VAL                                                     ~7
         12        DO_ICALL                                             $8      
         13        SEND_UNPACK                                                  $8
         14        CHECK_UNDEF_ARGS                                             
         15        DO_ICALL                                                     
   14    16        INIT_FCALL                                                   'var_export'
         17        INIT_FCALL                                                   'array_combine'
         18        SEND_VAR                                                     !2
         19        SEND_VAR                                                     !1
         20        DO_ICALL                                             $10     
         21        SEND_VAR                                                     $10
         22        DO_ICALL                                                     
   15    23        ECHO                                                         '%0A---%0A'
   11    24      > JMP                                                          ->2
         25    >   FE_FREE                                                      $4
   16    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
151.21 ms | 2113 KiB | 17 Q