3v4l.org

run code in 300+ PHP versions simultaneously
<?php $config = array( 'ciao' => 'come', 'va' => 'bene', 'tu' => 'ok' ); $configString = ' '; $configArray = array(); array_walk($config, function($value, $key) use(&$configString, &$configArray) { $configString .= $key . '=' . $value . ' '; $configArray[] = $key . '=' . $value; }); echo $configString; print_r($configArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iDcLR
function name:  (null)
number of ops:  15
compiled vars:  !0 = $config, !1 = $configString, !2 = $configArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, '+'
    9     2        ASSIGN                                                   !2, <array>
   10     3        INIT_FCALL                                               'array_walk'
          4        SEND_REF                                                 !0
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiDcLR%3A10%240'
          6        BIND_LEXICAL                                             ~6, !1
          7        BIND_LEXICAL                                             ~6, !2
   13     8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
   16    10        ECHO                                                     !1
   17    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FiDcLR%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iDcLR
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $value, !1 = $key, !2 = $configString, !3 = $configArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
   11     4        CONCAT                                           ~4      !1, '%3D'
          5        CONCAT                                           ~5      ~4, !0
          6        CONCAT                                           ~6      ~5, '+'
          7        ASSIGN_OP                                     8          !2, ~6
   12     8        CONCAT                                           ~9      !1, '%3D'
          9        CONCAT                                           ~10     ~9, !0
         10        ASSIGN_DIM                                               !3
         11        OP_DATA                                                  ~10
   13    12      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiDcLR%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.41 ms | 1388 KiB | 17 Q