3v4l.org

run code in 300+ PHP versions simultaneously
<?php $codes = ['tn', 'us', 'fr']; $names = ['Tunisia', 'United States', 'France']; echo implode( "\n", array_map( fn() => vsprintf('<option value="%s">%s</option>', func_get_args()), $codes, $names ) ); echo "\n---\n"; echo implode( "\n", array_map( fn(...$values) => vsprintf('<option value="%s">%s</option>', $values), $codes, $names ) ); echo "\n---\n"; foreach (array_map(null, $codes, $names) as $codeName) { vprintf('<option value="%s">%s</option>' . "\n", $codeName); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 38
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 38
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
filename:       /in/tIOli
function name:  (null)
number of ops:  40
compiled vars:  !0 = $codes, !1 = $names, !2 = $codeName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'implode'
    7     3        SEND_VAL                                                 '%0A'
    8     4        INIT_FCALL                                               'array_map'
    9     5        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          6        SEND_VAL                                                 ~5
   10     7        SEND_VAR                                                 !0
   11     8        SEND_VAR                                                 !1
    8     9        DO_ICALL                                         $6      
   11    10        SEND_VAR                                                 $6
    6    11        DO_ICALL                                         $7      
   11    12        ECHO                                                     $7
   15    13        ECHO                                                     '%0A---%0A'
   17    14        INIT_FCALL                                               'implode'
   18    15        SEND_VAL                                                 '%0A'
   19    16        INIT_FCALL                                               'array_map'
   20    17        DECLARE_LAMBDA_FUNCTION                          ~8      [1]
         18        SEND_VAL                                                 ~8
   21    19        SEND_VAR                                                 !0
   22    20        SEND_VAR                                                 !1
   19    21        DO_ICALL                                         $9      
   22    22        SEND_VAR                                                 $9
   17    23        DO_ICALL                                         $10     
   22    24        ECHO                                                     $10
   26    25        ECHO                                                     '%0A---%0A'
   28    26        INIT_FCALL                                               'array_map'
         27        SEND_VAL                                                 null
         28        SEND_VAR                                                 !0
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $11     
         31      > FE_RESET_R                                       $12     $11, ->38
         32    > > FE_FETCH_R                                               $12, !2, ->38
   29    33    >   INIT_FCALL                                               'vprintf'
         34        SEND_VAL                                                 '%3Coption+value%3D%22%25s%22%3E%25s%3C%2Foption%3E%0A'
         35        SEND_VAR                                                 !2
         36        DO_ICALL                                                 
   28    37      > JMP                                                      ->32
         38    >   FE_FREE                                                  $12
   30    39      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIOli
function name:  {closure}
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'vsprintf'
          1        SEND_VAL                                                 '%3Coption+value%3D%22%25s%22%3E%25s%3C%2Foption%3E'
          2        FUNC_GET_ARGS                                    ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tIOli
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV_VARIADIC                                    !0      
          1        INIT_FCALL                                               'vsprintf'
          2        SEND_VAL                                                 '%3Coption+value%3D%22%25s%22%3E%25s%3C%2Foption%3E'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.98 ms | 1008 KiB | 17 Q