-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest.php
73 lines (37 loc) · 898 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
$url = parse_url($_SERVER['REQUEST_URI']);
print_r($url);
$result = explode('/', $url['path']);
print_r($result);
function getArgumentStart($uri){
foreach ($uri as $key => $value){
if($value == 'index.php'){
if($key == count($uri) - 1 ) return -1;
return $key+1;
}
}
}
$function_name = $result[getArgumentStart($result)];
$arr = get_class_methods ( 'TEST' );
print_r($arr);
//print_r($arr['user'][1]());
function hello($a, $b){
echo "Hello, World";
return true;
};
class TEST{
function __construct(){
echo "TEST CREAITED";
}
function asdf($a, $b){
echo "<br />"."Inside test<br>";
}
}
//$r = new TEST();
call_user_func_array(array(new TEST, 'asdf'), array('argument1', 'argument2'));
function hello12(){
echo "Hello, World";
};
//$fun();
// $$function_name;
?>