3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'mc_gross' => 10.17, 'protection_eligibility' => 'Eligible', 'address_status' => 'unconfirmed', 'payer_id' => 'STTAC7UV2CVJ4' ]; var_export( array_reduce( array_keys($array), fn($result, $k) => $result + [str_replace('_', '', ucwords($k, '_')) => $array[$k]], [] ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UQF9C
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   10     1        INIT_FCALL                                                   'var_export'
   11     2        INIT_FCALL                                                   'array_reduce'
   12     3        INIT_FCALL                                                   'array_keys'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $2      
          6        SEND_VAR                                                     $2
   13     7        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          8        BIND_LEXICAL                                                 ~3, !0
          9        SEND_VAL                                                     ~3
   14    10        SEND_VAL                                                     <array>
   11    11        DO_ICALL                                             $4      
   14    12        SEND_VAR                                                     $4
   10    13        DO_ICALL                                                     
   16    14      > 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/UQF9C
function name:  {closure:/in/UQF9C:13}
number of ops:  14
compiled vars:  !0 = $result, !1 = $k, !2 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
          3        INIT_FCALL                                                   'ucwords'
          4        SEND_VAR                                                     !1
          5        SEND_VAL                                                     '_'
          6        DO_ICALL                                             $3      
          7        FRAMELESS_ICALL_3                str_replace         ~4      '_', ''
          8        OP_DATA                                                      $3
          9        FETCH_DIM_R                                          ~5      !2, !1
         10        INIT_ARRAY                                           ~6      ~5, ~4
         11        ADD                                                  ~7      !0, ~6
         12      > RETURN                                                       ~7
         13*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.8 ms | 1740 KiB | 17 Q