3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = array('material', 'britelki', 'chaschka', 'kostochki', 'vkladish', 'zastejka'); function create_from_variable($arr){ foreach($arr as $key){ $var = "show_the_product_".$key; $$var = function(){ echo '123'; }; } } create_from_variable($product); show_the_product_material();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rDHDE
function name:  (null)
number of ops:  7
compiled vars:  !0 = $product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'create_from_variable'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   24     4        INIT_FCALL_BY_NAME                                       'show_the_product_material'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function create_from_variable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/rDHDE
function name:  create_from_variable
number of ops:  11
compiled vars:  !0 = $arr, !1 = $key, !2 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1      > FE_RESET_R                                       $3      !0, ->9
          2    > > FE_FETCH_R                                               $3, !1, ->9
    9     3    >   CONCAT                                           ~4      'show_the_product_', !1
          4        ASSIGN                                                   !2, ~4
   11     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrDHDE%3A11%240'
          6        FETCH_W                      local               $6      !2
          7        ASSIGN                                                   $6, ~7
    6     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $3
   20    10      > RETURN                                                   null

End of function create_from_variable

Function %00%7Bclosure%7D%2Fin%2FrDHDE%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rDHDE
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     '123'
   15     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FrDHDE%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.05 ms | 1403 KiB | 14 Q