3v4l.org

run code in 300+ PHP versions simultaneously
<?php $eggCount = 3; for($i = 1; $i <= $eggCount; $i++) { create("eggs", array($i => array("ID" => $i))); } function create($arrName, Array $arrKeys) { $lName = "$".strtolower($arrName); $$lName = array(array()); foreach($arrKeys as $key => $value) { $$lName[$key] = $value; } for($i = 1; $i <= $GLOBALS['eggCount']; $i++) { echo "Egg $i's ID: " . $$lName[$i]['ID']; } print_r($arrKeys); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 3
Branch analysis from position: 12
Branch analysis from position: 3
filename:       /in/uiemB
function name:  (null)
number of ops:  13
compiled vars:  !0 = $eggCount, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 3
    5     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->10
    6     3    >   INIT_FCALL_BY_NAME                                       'create'
          4        SEND_VAL_EX                                              'eggs'
          5        INIT_ARRAY                                       ~4      !1, 'ID'
          6        INIT_ARRAY                                       ~5      ~4, !1
          7        SEND_VAL_EX                                              ~5
          8        DO_FCALL                                      0          
    5     9        PRE_INC                                                  !1
         10    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         11      > JMPNZ                                                    ~8, ->3
   19    12    > > RETURN                                                   1

Function create:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 19
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 19
Branch analysis from position: 32
Branch analysis from position: 19
Branch analysis from position: 16
filename:       /in/uiemB
function name:  create
number of ops:  36
compiled vars:  !0 = $arrName, !1 = $arrKeys, !2 = $lName, !3 = $value, !4 = $key, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'strtolower'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        CONCAT                                           ~7      '%24', $6
          6        ASSIGN                                                   !2, ~7
   11     7        FETCH_W                      local               $9      !2
          8        ASSIGN                                                   $9, <array>
   12     9      > FE_RESET_R                                       $11     !1, ->16
         10    > > FE_FETCH_R                                       ~12     $11, !3, ->16
         11    >   ASSIGN                                                   !4, ~12
   13    12        FETCH_W                      local               $14     !2
         13        ASSIGN_DIM                                               $14, !4
         14        OP_DATA                                                  !3
   12    15      > JMP                                                      ->10
         16    >   FE_FREE                                                  $11
   15    17        ASSIGN                                                   !5, 1
         18      > JMP                                                      ->28
   16    19    >   ROPE_INIT                                     3  ~18     'Egg+'
         20        ROPE_ADD                                      1  ~18     ~18, !5
         21        ROPE_END                                      2  ~17     ~18, '%27s+ID%3A+'
         22        FETCH_R                      local               ~20     !2
         23        FETCH_DIM_R                                      ~21     ~20, !5
         24        FETCH_DIM_R                                      ~22     ~21, 'ID'
         25        CONCAT                                           ~23     ~17, ~22
         26        ECHO                                                     ~23
   15    27        PRE_INC                                                  !5
         28    >   FETCH_R                      global              ~25     'GLOBALS'
         29        FETCH_DIM_R                                      ~26     ~25, 'eggCount'
         30        IS_SMALLER_OR_EQUAL                                      !5, ~26
         31      > JMPNZ                                                    ~27, ->19
   18    32    >   INIT_FCALL                                               'print_r'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
   19    35      > RETURN                                                   null

End of function create

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1392 KiB | 17 Q