<?php
function sort_link_param ( $link ) {
$option = explode('?',$link);
if($option[1]){
$arr = explode('&',$option[1]);
sort($arr);
$link = $option[0].'?';
foreach($arr as $value){
$link.= $value.'&';
}
return trim($link,'&');
}
else{
return $link;
}
}
$split_stat = array (
0 =>
array (
'land' => '/sign/wall?fr=1',
'visits' => 4,
'regs' => 0,
'split_redirect' => 4,
'weight' => 14,
),
1 =>
array (
'land' => '/sign/wall?mm=1',
'visits' => 5,
'regs' => 0,
'split_redirect' => 5,
'weight' => 14,
),
2 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 7,
'regs' => 0,
'split_redirect' => 7,
'weight' => 14,
),
3 =>
array (
'land' => '/sign/anim',
'visits' => 4,
'regs' => 0,
'split_redirect' => 4,
'weight' => 14,
),
4 =>
array (
'land' => '/sign/blue',
'visits' => 1,
'regs' => 0,
'split_redirect' => 1,
'weight' => 14,
),
5 =>
array (
'land' => '/sign/select',
'visits' => 5,
'regs' => 0,
'split_redirect' => 5,
'weight' => 14,
),
6 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 14,
),
7 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
8 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
9 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
10 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
11 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
12 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
13 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
14 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
15 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
16 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
17 =>
array (
'land' => '/sign/inter?fb=1&fr=1&mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
18 =>
array (
'land' => '/sign/inter?mm=1&vk=1',
'visits' => 0,
'regs' => 0,
'split_redirect' => 0,
'weight' => 100,
),
);
$split_lands = array (
0 => '/sign/wall?fr=1',
1 => '/sign/wall?mm=1',
2 => '/sign/inter?fr=1&fb=1&vk=1&mm=1',
3 => '/sign/anim',
4 => '/sign/blue',
5 => '/sign/select',
6 => '/sign/inter?vk=1&mm=1',
);
foreach ( $split_stat as $stat ) $lands_in_stat[] = sort_link_param($stat['land']);
var_dump($lands_in_stat);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename: /in/efvIP
function name: (null)
number of ops: 16
compiled vars: !0 = $split_stat, !1 = $split_lands, !2 = $stat, !3 = $lands_in_stat
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
22 0 E > ASSIGN !0, <array>
178 1 ASSIGN !1, <array>
189 2 > FE_RESET_R $6 !0, ->11
3 > > FE_FETCH_R $6, !2, ->11
4 > INIT_FCALL 'sort_link_param'
5 FETCH_DIM_R ~8 !2, 'land'
6 SEND_VAL ~8
7 DO_FCALL 0 $9
8 ASSIGN_DIM !3
9 OP_DATA $9
10 > JMP ->3
11 > FE_FREE $6
191 12 INIT_FCALL 'var_dump'
13 SEND_VAR !3
14 DO_ICALL
15 > RETURN 1
Function sort_link_param:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 32
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/efvIP
function name: sort_link_param
number of ops: 34
compiled vars: !0 = $link, !1 = $option, !2 = $arr, !3 = $value
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
3 0 E > RECV !0
6 1 INIT_FCALL 'explode'
2 SEND_VAL '%3F'
3 SEND_VAR !0
4 DO_ICALL $4
5 ASSIGN !1, $4
7 6 FETCH_DIM_R ~6 !1, 1
7 > JMPZ ~6, ->32
8 8 > INIT_FCALL 'explode'
9 SEND_VAL '%26'
10 FETCH_DIM_R ~7 !1, 1
11 SEND_VAL ~7
12 DO_ICALL $8
13 ASSIGN !2, $8
9 14 INIT_FCALL 'sort'
15 SEND_REF !2
16 DO_ICALL
10 17 FETCH_DIM_R ~11 !1, 0
18 CONCAT ~12 ~11, '%3F'
19 ASSIGN !0, ~12
11 20 > FE_RESET_R $14 !2, ->25
21 > > FE_FETCH_R $14, !3, ->25
12 22 > CONCAT ~15 !3, '%26'
23 ASSIGN_OP 8 !0, ~15
11 24 > JMP ->21
25 > FE_FREE $14
14 26 INIT_FCALL 'trim'
27 SEND_VAR !0
28 SEND_VAL '%26'
29 DO_ICALL $17
30 > RETURN $17
31* JMP ->33
18 32 > > RETURN !0
20 33* > RETURN null
End of function sort_link_param
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
151.52 ms | 1403 KiB | 22 Q