-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
72 lines (62 loc) · 1001 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
<?php
abort('Lorem ipsum <a href="/">dolor</a> sit amet.', false);
$array = [];
$array['a'] = 'a';
$array[1] = 1;
$function = function () {
return 123;
};
$object = (object) [];
$object->a = 'a';
$object->{1} = 1;
$string = 'a';
test(
$array,
$array[$array['a']],
$array['a'],
$array['a'][0],
$array[1],
$function(1, 'a', true, array(false, time())),
$function,
$object,
$object->a,
$object->a[0],
$object->{'1'},
$object->{1},
$string,
'a',
(object) [],
1,
1.0,
INF,
NAN,
[1, 2, 3],
[],
false,
null,
true,
);
test(
new DateTime(),
new DateTime,
new stdClass(),
new stdClass,
time(),
);
test(
$array[1],
$array[1 + 0],
$array[2 - 1],
$function(),
$function(1),
$function(1 + 1),
$function(2 - 2),
);
test(
$array ?: 1,
$array[time()] ?? 1,
);
$var = 1; test(1);
$var = 1; test($var, $var);
test($var + 1, 1 + $var, 1 + $var + 1);
exit;