3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrToStr($arr){ $str = ""; foreach($arr as $a) $str .= $a; return $str; } $lol = array( "why" => ["wont", "this", "work"], "its" => ["pretty", "darn", "annoying"], "hur" => ["dur"] ); $omg = array_slice($lol, 0, 1, count($lol), true); foreach($omg as $wtf => $bbq){ printf("%s: %s", $wtf, printArr($bbq)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 22
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/EfNSr
function name:  (null)
number of ops:  24
compiled vars:  !0 = $lol, !1 = $omg, !2 = $bbq, !3 = $wtf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1
          5        COUNT                                            ~5      !0
          6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
   17    10      > FE_RESET_R                                       $8      !1, ->22
         11    > > FE_FETCH_R                                       ~9      $8, !2, ->22
         12    >   ASSIGN                                                   !3, ~9
   18    13        INIT_FCALL                                               'printf'
         14        SEND_VAL                                                 '%25s%3A+%25s'
         15        SEND_VAR                                                 !3
         16        INIT_FCALL_BY_NAME                                       'printArr'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0  $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                                 
   17    21      > JMP                                                      ->11
         22    >   FE_FREE                                                  $8
   19    23      > RETURN                                                   1

Function arrtostr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/EfNSr
function name:  arrToStr
number of ops:  9
compiled vars:  !0 = $arr, !1 = $str, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2      > FE_RESET_R                                       $4      !0, ->6
          3    > > FE_FETCH_R                                               $4, !2, ->6
          4    >   ASSIGN_OP                                     8          !1, !2
          5      > JMP                                                      ->3
          6    >   FE_FREE                                                  $4
    6     7      > RETURN                                                   !1
    7     8*     > RETURN                                                   null

End of function arrtostr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.48 ms | 1400 KiB | 17 Q