3v4l.org

run code in 500+ PHP versions simultaneously
<?php $songs = [ ['Michael Jackson' => 'Thriller'], ['Michael Jackson' => 'Rock With You'], ['Teddy Pendergrass' => 'Love TKO'], ['ACDC' => 'Back in Black'] ]; $result = array_merge_recursive(...$songs); var_export($result); echo "\n---\n"; $template = <<<HTML <h2>%s</h2> <ul> <li>%s</li> </ul> HTML; foreach ($result as $artist => $songs) { printf( $template, $artist, implode('</li><li>', (array)$songs) ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/B8Gh7
function name:  (null)
number of ops:  24
compiled vars:  !0 = $songs, !1 = $result, !2 = $template, !3 = $artist
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL                                                   'array_merge_recursive'
          2        SEND_UNPACK                                                  !0
          3        CHECK_UNDEF_ARGS                                             
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
   11     6        INIT_FCALL                                                   'var_export'
          7        SEND_VAR                                                     !1
          8        DO_ICALL                                                     
   12     9        ECHO                                                         '%0A---%0A'
   14    10        ASSIGN                                                       !2, '%3Ch2%3E%25s%3C%2Fh2%3E%0A%3Cul%3E%0A++++%3Cli%3E%25s%3C%2Fli%3E%0A%3C%2Ful%3E%0A'
   22    11      > FE_RESET_R                                           $9      !1, ->22
         12    > > FE_FETCH_R                                           ~10     $9, !0, ->22
         13    >   ASSIGN                                                       !3, ~10
   23    14        INIT_FCALL                                                   'printf'
   24    15        SEND_VAR                                                     !2
   25    16        SEND_VAR                                                     !3
   26    17        CAST                                              7  ~12     !0
         18        FRAMELESS_ICALL_2                implode             ~13     '%3C%2Fli%3E%3Cli%3E', ~12
         19        SEND_VAL                                                     ~13
   23    20        DO_ICALL                                                     
   22    21      > JMP                                                          ->12
         22    >   FE_FREE                                                      $9
   28    23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.45 ms | 2100 KiB | 16 Q