3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array[0] = ['krotki_klucz'=>0, 'dluuuuuugi_klucz'=>0, 'sreeedni_klucz'=>0];//pierwszy wymiar $array[1] = ['krotki_klucz'=>4, 'dluuuuuugi_klucz'=>4, 'sreeeedni_klucz'=>4];//drugi wymiar $array[3] = ['krotki_klucz'=>3, 'dluuuuuugi_klucz'=>3, 'sreeeedni_klucz'=>3];//trzeci wymiar $najdluzszy_klucz = ''; array_walk($array[0], function($value, $key){ global $najdluzszy_klucz; $najdluzszy_klucz = (strlen($key)>=strlen($najdluzszy_klucz))?$key:$najdluzszy_klucz; }); echo "Najdluzszy klucz to: $najdluzszy_klucz";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gun9Y
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $najdluzszy_klucz
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                                   !0, 0
          1        OP_DATA                                                      <array>
    3     2        ASSIGN_DIM                                                   !0, 1
          3        OP_DATA                                                      <array>
    4     4        ASSIGN_DIM                                                   !0, 3
          5        OP_DATA                                                      <array>
    5     6        ASSIGN                                                       !1, ''
    6     7        INIT_FCALL                                                   'array_walk'
          8        FETCH_DIM_W                                          $6      !0, 0
          9        SEND_REF                                                     $6
         10        DECLARE_LAMBDA_FUNCTION                              ~7      [0]
    9    11        SEND_VAL                                                     ~7
    6    12        DO_ICALL                                                     
   10    13        NOP                                                          
         14        FAST_CONCAT                                          ~9      'Najdluzszy+klucz+to%3A+', !1
         15        ECHO                                                         ~9
         16      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gun9Y
function name:  {closure:/in/gun9Y:6}
number of ops:  12
compiled vars:  !0 = $value, !1 = $key, !2 = $najdluzszy_klucz
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        BIND_GLOBAL                                                  !2, 'najdluzszy_klucz'
    8     3        STRLEN                                               ~3      !1
          4        STRLEN                                               ~4      !2
          5        IS_SMALLER_OR_EQUAL                                          ~4, ~3
          6      > JMPZ                                                         ~5, ->9
          7    >   QM_ASSIGN                                            ~6      !1
          8      > JMP                                                          ->10
          9    >   QM_ASSIGN                                            ~6      !2
         10    >   ASSIGN                                                       !2, ~6
    9    11      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.15 ms | 3296 KiB | 14 Q