3v4l.org

run code in 300+ 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 = 25
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 25
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/B8Gh7
function name:  (null)
number of ops:  27
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, ->25
         12    > > FE_FETCH_R                                       ~10     $9, !0, ->25
         13    >   ASSIGN                                                   !3, ~10
   23    14        INIT_FCALL                                               'printf'
   24    15        SEND_VAR                                                 !2
   25    16        SEND_VAR                                                 !3
   26    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%3C%2Fli%3E%3Cli%3E'
         19        CAST                                          7  ~12     !0
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
   23    23        DO_ICALL                                                 
   22    24      > JMP                                                      ->12
         25    >   FE_FREE                                                  $9
   28    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.99 ms | 1004 KiB | 17 Q