3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = array( "text" => 2, "image" => 2, "audio" => 2, ); $result = []; for ($i = 0, $universalCount = current($types); $i < $universalCount; ++$i) { array_push($result, ...array_keys($types)); } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
Branch analysis from position: 8
filename:       /in/lGNtv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $types, !1 = $result, !2 = $i, !3 = $universalCount
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2        ASSIGN                                                   !2, 0
          3        INIT_FCALL                                               'current'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !3, $7
          7      > JMP                                                      ->17
   11     8    >   INIT_FCALL                                               'array_push'
          9        SEND_REF                                                 !1
         10        INIT_FCALL                                               'array_keys'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $9      
         13        SEND_UNPACK                                              $9
         14        CHECK_UNDEF_ARGS                                         
         15        DO_ICALL                                                 
   10    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, !3
         18      > JMPNZ                                                    ~12, ->8
   13    19    >   INIT_FCALL                                               'var_export'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.47 ms | 1001 KiB | 17 Q