3v4l.org

run code in 300+ 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 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/s7T2o
function name:  (null)
number of ops:  27
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, ->21
         10    > > FE_FETCH_R                                       ~11     $10, !1, ->21
         11    >   ASSIGN                                                   !2, ~11
   15    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 '%2C'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $16     
         16        FETCH_W                      global              $13     'videos'
         17        FETCH_DIM_W                                      $14     $13, !2
         18        ASSIGN_DIM                                               $14, 'category'
         19        OP_DATA                                                  $16
   14    20      > JMP                                                      ->10
         21    >   FE_FREE                                                  $10
   18    22        INIT_FCALL                                               'print_r'
         23        FETCH_R                      global              ~17     'categories'
         24        SEND_VAL                                                 ~17
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.9 ms | 999 KiB | 15 Q