3v4l.org

run code in 500+ PHP versions simultaneously
<?php $fake_db_results = [ ['session_id' => 1, 'page_url' => 'http://a.com'], ['session_id' => 1, 'page_url' => 'http://b.com'], ['session_id' => 1, 'page_url' => 'http://c.com'], ['session_id' => 2, 'page_url' => 'http://d.com'], ['session_id' => 2, 'page_url' => 'http://e.com'], ['session_id' => 3, 'page_url' => 'http://f.com'], ['session_id' => 4, 'page_url' => 'http://g.com'], ['session_id' => 5, 'page_url' => 'http://h.com'] ]; $paths = []; foreach ($fake_db_results as $row) { array_push($paths[$row['session_id']], $row['page_url']); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/aCsWi
function name:  (null)
number of ops:  14
compiled vars:  !0 = $fake_db_results, !1 = $paths, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1        ASSIGN                                                       !1, <array>
   15     2      > FE_RESET_R                                           $5      !0, ->12
          3    > > FE_FETCH_R                                                   $5, !2, ->12
   16     4    >   INIT_FCALL                                                   'array_push'
          5        FETCH_DIM_R                                          ~6      !2, 'session_id'
          6        FETCH_DIM_W                                          $7      !1, ~6
          7        SEND_REF                                                     $7
          8        FETCH_DIM_R                                          ~8      !2, 'page_url'
          9        SEND_VAL                                                     ~8
         10        DO_ICALL                                                     
   15    11      > JMP                                                          ->3
         12    >   FE_FREE                                                      $5
   17    13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
175.09 ms | 2617 KiB | 13 Q