3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( array('id' => 1, 'name' => 'Bob', 'position' => 'Clerk'), array('id' => 2, 'name' => 'Alan', 'position' => 'Manager'), array('id' => 3, 'name' => 'James', 'position' => 'Director') ); $names = array_map( function($person) { return $person['name']; }, $data ); $names = array(); foreach ($data as $row) { $names[] = $row['name']; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/NKpdU
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data, !1 = $names, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_map'
    9     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNKpdU%3A9%240'
          3        SEND_VAL                                                 ~4
   10     4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
    8     6        ASSIGN                                                   !1, $5
   13     7        ASSIGN                                                   !1, <array>
   15     8      > FE_RESET_R                                       $8      !0, ->14
          9    > > FE_FETCH_R                                               $8, !2, ->14
   16    10    >   FETCH_DIM_R                                      ~10     !2, 'name'
         11        ASSIGN_DIM                                               !1
         12        OP_DATA                                                  ~10
   15    13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $8
   17    15      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FNKpdU%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.02 ms | 1395 KiB | 15 Q