<?php
$d = [
[
'id' => 1,
'name' => 'bir',
'children' => [
[
'id' => 1001,
'children' => [
[
'id' => 10011,
'parent_id' => 1001,
'name' => 'onbinonbir',
],
[
'id' => 10012,
'parent_id' => 1001,
'name' => 'onbinoniki',
]
]
],
[
'id' => 1002,
'children' => [
[
'id' => 10021,
'parent_id' => 1002,
'name' => 'onbinyirmibir',
],
[
'id' => 10022,
'parent_id' => 1002,
'name' => 'onbinyirmiiki',
]
]
]
]
],
[
'id' => 2,
'name' => 'iki',
'children' => [
[
'id' => 2001,
'children' => [
[
'id' => 20011,
'parent_id' => 2001,
'name' => 'yirmibinonbir',
],
[
'id' => 20012,
'parent_id' => 2001,
'name' => 'yirmibinoniki',
]
]
],
[
'id' => 2002,
'children' => [
[
'id' => 20021,
'parent_id' => 2002,
'name' => 'yirmibinyirmibir',
],
[
'id' => 20022,
'parent_id' => 2002,
'name' => 'yirmibinyirmiiki',
]
]
]
]
]
];
$birinciler = array_column($d, 'id', 'id');
//var_dump($birinciler);
$ikinciler = array_column($d, 'children', 'id');
var_dump($ikinciler);
$ucunculer = array_column($ikinciler, 'children');
//var_dump($ikinciler);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/qq1i8
function name: (null)
number of ops: 22
compiled vars: !0 = $d, !1 = $birinciler, !2 = $ikinciler, !3 = $ucunculer
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN !0, <array>
78 1 INIT_FCALL 'array_column'
2 SEND_VAR !0
3 SEND_VAL 'id'
4 SEND_VAL 'id'
5 DO_ICALL $5
6 ASSIGN !1, $5
80 7 INIT_FCALL 'array_column'
8 SEND_VAR !0
9 SEND_VAL 'children'
10 SEND_VAL 'id'
11 DO_ICALL $7
12 ASSIGN !2, $7
81 13 INIT_FCALL 'var_dump'
14 SEND_VAR !2
15 DO_ICALL
82 16 INIT_FCALL 'array_column'
17 SEND_VAR !2
18 SEND_VAL 'children'
19 DO_ICALL $10
20 ASSIGN !3, $10
83 21 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
222.62 ms | 953 KiB | 15 Q