<?php
$data['menus'] = array(
'1' => array(
'Dashboard' => '/LMS/Dashboard',
),
'2' => array(
'Notifications' => '/LMS/Notifications',
),
'3' => array(
'Clients' => '/LMS/Clients',
),
'4' => array(
'Penalties' => '/LMS/Penalties',
),
'5' => array(
'Payments' => '/LMS/Payments',
),
'6' => array(
'Profit' => '/LMS/Profit',
),
'7' => array(
'Income' => '/LMS/Income',
),
'8' => array(
'Outcome' => '/LMS/Outcome',
),
'9' => array(
'Accounts' => '/LMS/Accounts',
)
);
$access = array (
'pages_id' =>
array (
0 => 1,
1 => 2,
2 => 3,
3 => 4,
4 => 8,
5 => 9
),
);
print_r(array_intersect_key($data['menus'], array_flip($access['pages_id'])));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/MVFER
function name: (null)
number of ops: 16
compiled vars: !0 = $data, !1 = $access
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > ASSIGN_DIM !0, 'menus'
5 1 OP_DATA <array>
33 2 ASSIGN !1, <array>
45 3 INIT_FCALL 'print_r'
4 INIT_FCALL 'array_intersect_key'
5 FETCH_DIM_R ~4 !0, 'menus'
6 SEND_VAL ~4
7 INIT_FCALL 'array_flip'
8 FETCH_DIM_R ~5 !1, 'pages_id'
9 SEND_VAL ~5
10 DO_ICALL $6
11 SEND_VAR $6
12 DO_ICALL $7
13 SEND_VAR $7
14 DO_ICALL
15 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
141.07 ms | 1398 KiB | 19 Q