forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbug-14214.php
More file actions
88 lines (82 loc) · 1.29 KB
/
bug-14214.php
File metadata and controls
88 lines (82 loc) · 1.29 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php declare(strict_types = 1);
namespace Bug14214;
use function PHPStan\Testing\assertType;
class HelloWorld
{
public static function is_too_slow(): void
{
$x0 = $x1 = $x2 = $x3 = $x4 = $x5 = $x6 = $x7 = $x8 = $x9 = $x10 = null;
$x11 = $x12 = $x13 = $x14 = $x15 = $x16 = null;
if (rand(0, 1)) {
$x0 = rand(0, 1);
}
if (rand(0, 1)) {
$x1 = rand(2, 3);
}
if (rand(0, 1)) {
$x2 = rand(4, 5);
}
if (rand(0, 1)) {
$x3 = rand(6, 7);
}
if (rand(0, 1)) {
$x4 = rand(8, 9);
}
if (rand(0, 1)) {
$x5 = rand(10, 11);
}
if (rand(0, 1)) {
$x6 = rand(12, 13);
}
if (rand(0, 1)) {
$x7 = rand(14, 15);
}
if (rand(0, 1)) {
$x8 = rand(16, 17);
}
if (rand(0, 1)) {
$x9 = rand(18, 19);
}
if (rand(0, 1)) {
$x10 = rand(20, 21);
}
if (rand(0, 1)) {
$x11 = rand(22, 23);
}
if (rand(0, 1)) {
$x12 = rand(24, 25);
}
if (rand(0, 1)) {
$x13 = rand(26, 27);
}
if (rand(0, 1)) {
$x14 = rand(28, 29);
}
if (rand(0, 1)) {
$x15 = rand(30, 31);
}
if (rand(0, 1)) {
$x16 = rand(32, 33);
}
$x = (
$x0 ??
$x1 ??
$x2 ??
$x3 ??
$x4 ??
$x5 ??
$x6 ??
$x7 ??
$x8 ??
$x9 ??
$x10 ??
$x11 ??
$x12 ??
$x13 ??
$x14 ??
$x15 ??
$x16
);
assertType('int<0, 33>|null', $x);
}
}