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);echo $lName; $$lName = array(); foreach($arrKeys as $key => $value) { $$lName[$key] = $value; } for($i = 1; $i <= $GLOBALS['eggCount']; $i++) { echo "Egg $i's ID: " . $eggs[$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/ZcoKK
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 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 20
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 20
Branch analysis from position: 32
Branch analysis from position: 20
Branch analysis from position: 17
filename:       /in/ZcoKK
function name:  create
number of ops:  36
compiled vars:  !0 = $arrName, !1 = $arrKeys, !2 = $lName, !3 = $value, !4 = $key, !5 = $i, !6 = $eggs
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                                         $7      
          5        CONCAT                                           ~8      '%24', $7
          6        ASSIGN                                                   !2, ~8
          7        ECHO                                                     !2
   11     8        FETCH_W                      local               $10     !2
          9        ASSIGN                                                   $10, <array>
   12    10      > FE_RESET_R                                       $12     !1, ->17
         11    > > FE_FETCH_R                                       ~13     $12, !3, ->17
         12    >   ASSIGN                                                   !4, ~13
   13    13        FETCH_W                      local               $15     !2
         14        ASSIGN_DIM                                               $15, !4
         15        OP_DATA                                                  !3
   12    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $12
   15    18        ASSIGN                                                   !5, 1
         19      > JMP                                                      ->28
   16    20    >   ROPE_INIT                                     3  ~19     'Egg+'
         21        ROPE_ADD                                      1  ~19     ~19, !5
         22        ROPE_END                                      2  ~18     ~19, '%27s+ID%3A+'
         23        FETCH_DIM_R                                      ~21     !6, !5
         24        FETCH_DIM_R                                      ~22     ~21, 'ID'
         25        CONCAT                                           ~23     ~18, ~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, ->20
   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.52 ms | 1400 KiB | 17 Q