3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrVal = array ( '22' => array( '0' => 60, '29' => array( '0' => 6 ), '30' => array ( '0' => 5, '1' => 8 ), '31' => array ( '0' => 7, '1' => 9, '2' => 14, '3' => 26 ) ), '23' => 12, '35' => 10, '42' => 22 ); //60[6][5||8][7||9||14||26]|12|10|22 $constructedValue = ""; echo $constructedValue = implodeMultiArr($arrVal); function implodeMultiArr($arrVal) { if ( is_array($arrVal) ) { $constructedValue .= "[".implodeMultiArr($value)."]"; } else { $constructedValue .= $value."||"; } return $constructedValue; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tsTXc
function name:  (null)
number of ops:  8
compiled vars:  !0 = $arrVal, !1 = $constructedValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   24     1        ASSIGN                                                   !1, ''
   25     2        INIT_FCALL_BY_NAME                                       'implodeMultiArr'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                           ~5      !1, $4
          6        ECHO                                                     ~5
   33     7      > RETURN                                                   1

Function implodemultiarr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tsTXc
function name:  implodeMultiArr
number of ops:  14
compiled vars:  !0 = $arrVal, !1 = $constructedValue, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~3, ->10
   28     3    >   INIT_FCALL_BY_NAME                                       'implodeMultiArr'
          4        SEND_VAR_EX                                              !2
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      '%5B', $4
          7        CONCAT                                           ~6      ~5, '%5D'
          8        ASSIGN_OP                                     8          !1, ~6
          9      > JMP                                                      ->12
   30    10    >   CONCAT                                           ~8      !2, '%7C%7C'
         11        ASSIGN_OP                                     8          !1, ~8
   32    12    > > RETURN                                                   !1
   33    13*     > RETURN                                                   null

End of function implodemultiarr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.95 ms | 1394 KiB | 13 Q