3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('array_column')) { function array_column($array, $column) { $result = array(); foreach ($array as $row) { if (isset($row[$column])) { $result[] = $row[$column]; } } return $result; } } $samples=array( array('page' => 'page1', 'name' => 'pagename1'), array('page' => 'page2', 'name' => 'pagename2'), array('page' => 'page3', 'name' => 'pagename3') ); $names = array_column($samples, 'name'); print_r($names);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/q66cL
function name:  (null)
number of ops:  16
compiled vars:  !0 = $samples, !1 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'array_column'
          2        DO_ICALL                                         $2      
          3        BOOL_NOT                                         ~3      $2
          4      > JMPZ                                                     ~3, ->6
    3     5    >   DECLARE_FUNCTION                                         'array_column'
   14     6    >   ASSIGN                                                   !0, <array>
   19     7        INIT_FCALL                                               'array_column'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 'name'
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
   20    12        INIT_FCALL                                               'print_r'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00array_column%2Fin%2Fq66cL%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/q66cL
function name:  array_column
number of ops:  14
compiled vars:  !0 = $array, !1 = $column, !2 = $result, !3 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, <array>
    6     3      > FE_RESET_R                                       $5      !0, ->11
          4    > > FE_FETCH_R                                               $5, !3, ->11
    7     5    >   ISSET_ISEMPTY_DIM_OBJ                         0          !3, !1
          6      > JMPZ                                                     ~6, ->10
    8     7    >   FETCH_DIM_R                                      ~8      !3, !1
          8        ASSIGN_DIM                                               !2
          9        OP_DATA                                                  ~8
    6    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $5
   11    12      > RETURN                                                   !2
   12    13*     > RETURN                                                   null

End of function %00array_column%2Fin%2Fq66cL%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.83 ms | 1396 KiB | 19 Q