3v4l.org

run code in 300+ PHP versions simultaneously
<?php $resultStrings = array(); foreach ($array as $key => $values) { $subarrayString = "('$key','" . implode($values, "','") . "')"; $resultStrings[] = $subarrayString; } $result = implode($resultStrings, ","); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/lY6Wf
function name:  (null)
number of ops:  24
compiled vars:  !0 = $resultStrings, !1 = $array, !2 = $values, !3 = $key, !4 = $subarrayString, !5 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_R                                       $7      !1, ->17
          2    > > FE_FETCH_R                                       ~8      $7, !2, ->17
          3    >   ASSIGN                                                   !3, ~8
    4     4        ROPE_INIT                                     3  ~11     '%28%27'
          5        ROPE_ADD                                      1  ~11     ~11, !3
          6        ROPE_END                                      2  ~10     ~11, '%27%2C%27'
          7        INIT_FCALL                                               'implode'
          8        SEND_VAR                                                 !2
          9        SEND_VAL                                                 '%27%2C%27'
         10        DO_ICALL                                         $13     
         11        CONCAT                                           ~14     ~10, $13
         12        CONCAT                                           ~15     ~14, '%27%29'
         13        ASSIGN                                                   !4, ~15
    5    14        ASSIGN_DIM                                               !0
         15        OP_DATA                                                  !4
    3    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $7
    8    18        INIT_FCALL                                               'implode'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 '%2C'
         21        DO_ICALL                                         $18     
         22        ASSIGN                                                   !5, $18
    9    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.72 ms | 1395 KiB | 15 Q