3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1395 KiB | 15 Q