3v4l.org

run code in 300+ PHP versions simultaneously
(<?php $custom_fields = [ 'foo' => '17', ]; $time_intervals = ['day', 'month', 'year', 'hour', 'minute', 'period']; $data = [ 'fooday' => '17', 'foomonth' => 'March', 'name' => 'Chris' ]; var_dump(array_map(function ($field, $interval) { return $field . $interval; }, array_keys($custom_fields), $time_intervals)); foreach (array_keys($custom_fields) as $name) { foreach ($time_intervals as $interval_name) { // ; } } var_dump($data); // Result should be array that only contains $data['name'] = 'Chris'
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 24
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/XQtX7
function name:  (null)
number of ops:  31
compiled vars:  !0 = $custom_fields, !1 = $time_intervals, !2 = $data, !3 = $name, !4 = $interval_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%28'
    2     1        ASSIGN                                                   !0, <array>
    6     2        ASSIGN                                                   !1, <array>
    8     3        ASSIGN                                                   !2, <array>
   15     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXQtX7%3A15%240'
          7        SEND_VAL                                                 ~8
          8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                                 
   18    16        INIT_FCALL                                               'array_keys'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $12     
         19      > FE_RESET_R                                       $13     $12, ->26
         20    > > FE_FETCH_R                                               $13, !3, ->26
   19    21    > > FE_RESET_R                                       $14     !1, ->24
         22    > > FE_FETCH_R                                               $14, !4, ->24
         23    > > JMP                                                      ->22
         24    >   FE_FREE                                                  $14
   18    25      > JMP                                                      ->20
         26    >   FE_FREE                                                  $13
   25    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   27    30      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FXQtX7%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XQtX7
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $field, !1 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FXQtX7%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
200.48 ms | 1400 KiB | 19 Q