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; $$lName[$key]; } for($i = 1; $i <= $GLOBALS['eggCount']; $i++) { //echo "Egg $i's ID: " . $$lName[$i]; } print_r($$lName); }
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/LjUJ2
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 = 19
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 22
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 22
Branch analysis from position: 27
Branch analysis from position: 22
Branch analysis from position: 19
filename:       /in/LjUJ2
function name:  create
number of ops:  32
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, ->19
         10    > > FE_FETCH_R                                       ~12     $11, !3, ->19
         11    >   ASSIGN                                                   !4, ~12
   13    12        FETCH_W                      local               $14     !2
         13        ASSIGN_DIM                                               $14, !4
         14        OP_DATA                                                  !3
         15        FETCH_R                      local               ~16     !2
         16        FETCH_DIM_R                                      ~17     ~16, !4
         17        FREE                                                     ~17
   12    18      > JMP                                                      ->10
         19    >   FE_FREE                                                  $11
   15    20        ASSIGN                                                   !5, 1
         21      > JMP                                                      ->23
         22    >   PRE_INC                                                  !5
         23    >   FETCH_R                      global              ~20     'GLOBALS'
         24        FETCH_DIM_R                                      ~21     ~20, 'eggCount'
         25        IS_SMALLER_OR_EQUAL                                      !5, ~21
         26      > JMPNZ                                                    ~22, ->22
   18    27    >   INIT_FCALL                                               'print_r'
         28        FETCH_R                      local               ~23     !2
         29        SEND_VAL                                                 ~23
         30        DO_ICALL                                                 
   19    31      > RETURN                                                   null

End of function create

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.15 ms | 1400 KiB | 17 Q