3v4l.org

run code in 500+ PHP versions simultaneously
<?php //initialization of an element of GLOBALS $GLOBALS['categories'] = array(1=>'z',2=>'x',3=>'c',4=>'v',5=>'r'); print_r($GLOBALS['categories']); //another element $GLOBALS['videos'] = array(1=>'a',2=>'b',3=>'c',4=>'d'); //some operations $videosCategories = array(1=>array(2,3,4,5),2=>array(12,13,14,15),3=>array(22,23,24,25),4=>array(32,33,34,35)); foreach($videosCategories as $videoId => $categories2) $GLOBALS['videos'][$videoId]['category'] = implode(',',$categories2); //the initial element is reqritten print_r($GLOBALS['categories']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/s7T2o
function name:  (null)
number of ops:  24
compiled vars:  !0 = $videosCategories, !1 = $categories2, !2 = $videoId
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                          global              $3      'categories'
          1        ASSIGN                                                       $3, <array>
    5     2        INIT_FCALL                                                   'print_r'
          3        FETCH_R                          global              ~5      'categories'
          4        SEND_VAL                                                     ~5
          5        DO_ICALL                                                     
    8     6        FETCH_W                          global              $7      'videos'
          7        ASSIGN                                                       $7, <array>
   11     8        ASSIGN                                                       !0, <array>
   14     9      > FE_RESET_R                                           $10     !0, ->18
         10    > > FE_FETCH_R                                           ~11     $10, !1, ->18
         11    >   ASSIGN                                                       !2, ~11
   15    12        FRAMELESS_ICALL_2                implode             ~16     '%2C', !1
         13        FETCH_W                          global              $13     'videos'
         14        FETCH_DIM_W                                          $14     $13, !2
         15        ASSIGN_DIM                                                   $14, 'category'
         16        OP_DATA                                                      ~16
   14    17      > JMP                                                          ->10
         18    >   FE_FREE                                                      $10
   18    19        INIT_FCALL                                                   'print_r'
         20        FETCH_R                          global              ~17     'categories'
         21        SEND_VAL                                                     ~17
         22        DO_ICALL                                                     
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.83 ms | 1745 KiB | 9 Q