3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $lucky_numbers = []; for($i = 0; $i < 5; $i++) { while(true) { $number = rand(1, 35); if (!in_array($number, $lucky_numbers)) { $lucky_numbers[] = $number; break; } } } sort($lucky_numbers); echo PHP_EOL . 'Laimīgie skaitļi: ' . implode(', ', $lucky_numbers) . PHP_EOL;
Output for 7.1.0
Laimīgie skaitļi: 5, 6, 9, 17, 20
Output for 7.0.14
Laimīgie skaitļi: 3, 10, 11, 31, 33
Output for 7.0.8
Laimīgie skaitļi: 6, 15, 26, 32, 33
Output for 7.0.7
Laimīgie skaitļi: 6, 8, 27, 33, 34
Output for 7.0.6
Laimīgie skaitļi: 7, 10, 13, 24, 35
Output for 7.0.5
Laimīgie skaitļi: 4, 10, 20, 23, 29
Output for 7.0.4
Laimīgie skaitļi: 1, 14, 27, 28, 33
Output for 7.0.3
Laimīgie skaitļi: 1, 4, 5, 20, 21
Output for 7.0.2
Laimīgie skaitļi: 2, 7, 8, 11, 27
Output for 7.0.1
Laimīgie skaitļi: 3, 6, 8, 15, 34
Output for 7.0.0
Laimīgie skaitļi: 12, 15, 22, 23, 32
Output for hhvm-3.12.0
Laimīgie skaitļi: 8, 10, 11, 29, 31
Output for hhvm-3.10.0
Laimīgie skaitļi: 3, 6, 11, 15, 27
Output for 5.6.28
Laimīgie skaitļi: 4, 10, 18, 22, 29
Output for 5.6.23
Laimīgie skaitļi: 4, 5, 20, 26, 31
Output for 5.6.22
Laimīgie skaitļi: 3, 7, 24, 27, 30
Output for 5.6.21
Laimīgie skaitļi: 2, 18, 22, 24, 29
Output for 5.6.20
Laimīgie skaitļi: 1, 7, 16, 25, 28
Output for 5.6.19
Laimīgie skaitļi: 7, 12, 21, 24, 35
Output for 5.6.18
Laimīgie skaitļi: 9, 13, 15, 19, 20
Output for 5.6.17
Laimīgie skaitļi: 4, 9, 10, 23, 28
Output for 5.6.16
Laimīgie skaitļi: 5, 11, 20, 22, 23
Output for 5.6.15
Laimīgie skaitļi: 4, 9, 23, 24, 30
Output for 5.6.14
Laimīgie skaitļi: 6, 9, 23, 26, 31
Output for 5.6.13
Laimīgie skaitļi: 7, 10, 13, 25, 33
Output for 5.6.12
Laimīgie skaitļi: 3, 13, 23, 30, 33
Output for 5.6.11
Laimīgie skaitļi: 3, 5, 12, 16, 35
Output for 5.6.10
Laimīgie skaitļi: 4, 16, 21, 24, 31
Output for 5.6.9
Laimīgie skaitļi: 1, 14, 15, 22, 33
Output for 5.6.8
Laimīgie skaitļi: 1, 2, 5, 22, 33
Output for 5.6.7
Laimīgie skaitļi: 5, 9, 16, 31, 32
Output for 5.6.6
Laimīgie skaitļi: 4, 22, 24, 26, 33
Output for 5.6.5
Laimīgie skaitļi: 6, 7, 12, 16, 25
Output for 5.6.4
Laimīgie skaitļi: 12, 24, 25, 27, 33
Output for 5.6.3
Laimīgie skaitļi: 2, 11, 12, 29, 35
Output for 5.6.2
Laimīgie skaitļi: 8, 12, 13, 22, 33
Output for 5.6.1
Laimīgie skaitļi: 5, 10, 13, 14, 30
Output for 5.6.0
Laimīgie skaitļi: 10, 17, 19, 24, 29
Output for 5.5.37
Laimīgie skaitļi: 3, 14, 19, 20, 34
Output for 5.5.36
Laimīgie skaitļi: 7, 18, 26, 31, 35
Output for 5.5.35
Laimīgie skaitļi: 3, 9, 14, 24, 35
Output for 5.5.34
Laimīgie skaitļi: 2, 15, 17, 18, 26
Output for 5.5.33
Laimīgie skaitļi: 3, 7, 26, 29, 31
Output for 5.5.32
Laimīgie skaitļi: 13, 21, 28, 32, 33
Output for 5.5.31
Laimīgie skaitļi: 3, 9, 15, 25, 33
Output for 5.5.30
Laimīgie skaitļi: 8, 12, 19, 20, 29
Output for 5.5.29
Laimīgie skaitļi: 2, 12, 21, 24, 25
Output for 5.5.28
Laimīgie skaitļi: 13, 15, 17, 26, 31
Output for 5.5.27
Laimīgie skaitļi: 6, 11, 20, 27, 32
Output for 5.5.26
Laimīgie skaitļi: 5, 8, 17, 19, 27
Output for 5.5.25
Laimīgie skaitļi: 12, 14, 28, 29, 30
Output for 5.5.24
Laimīgie skaitļi: 13, 25, 31, 32, 35
Output for 5.5.23
Laimīgie skaitļi: 9, 21, 23, 28, 35
Output for 5.5.22
Laimīgie skaitļi: 5, 15, 16, 24, 33
Output for 5.5.21
Laimīgie skaitļi: 20, 21, 22, 27, 28
Output for 5.5.20
Laimīgie skaitļi: 9, 13, 16, 20, 21
Output for 5.5.19
Laimīgie skaitļi: 9, 15, 16, 18, 29
Output for 5.5.18
Laimīgie skaitļi: 9, 20, 21, 24, 34
Output for 5.5.16
Laimīgie skaitļi: 11, 12, 18, 23, 33
Output for 5.5.15
Laimīgie skaitļi: 9, 11, 21, 22, 29
Output for 5.5.14
Laimīgie skaitļi: 10, 21, 27, 32, 34
Output for 5.5.13
Laimīgie skaitļi: 1, 8, 15, 19, 25
Output for 5.5.12
Laimīgie skaitļi: 11, 16, 21, 32, 34
Output for 5.5.11
Laimīgie skaitļi: 4, 6, 26, 29, 32
Output for 5.5.10
Laimīgie skaitļi: 11, 14, 16, 29, 31
Output for 5.5.9
Laimīgie skaitļi: 7, 8, 11, 25, 33
Output for 5.5.8
Laimīgie skaitļi: 6, 19, 29, 30, 34
Output for 5.5.7
Laimīgie skaitļi: 4, 7, 27, 29, 35
Output for 5.5.6
Laimīgie skaitļi: 6, 14, 19, 22, 34
Output for 5.5.5
Laimīgie skaitļi: 2, 10, 24, 25, 28
Output for 5.5.4
Laimīgie skaitļi: 7, 10, 12, 21, 23
Output for 5.5.3
Laimīgie skaitļi: 2, 6, 8, 9, 31
Output for 5.5.2
Laimīgie skaitļi: 5, 11, 16, 26, 33
Output for 5.5.1
Laimīgie skaitļi: 13, 20, 24, 31, 32
Output for 5.5.0
Laimīgie skaitļi: 3, 5, 14, 26, 34
Output for 5.4.45
Laimīgie skaitļi: 18, 25, 30, 32, 33
Output for 5.4.44
Laimīgie skaitļi: 4, 5, 6, 28, 31
Output for 5.4.43
Laimīgie skaitļi: 3, 12, 18, 34, 35
Output for 5.4.42
Laimīgie skaitļi: 4, 8, 17, 21, 25
Output for 5.4.41
Laimīgie skaitļi: 5, 9, 16, 23, 25
Output for 5.4.40
Laimīgie skaitļi: 2, 8, 15, 16, 21
Output for 5.4.39
Laimīgie skaitļi: 7, 8, 10, 11, 15
Output for 5.4.38
Laimīgie skaitļi: 1, 5, 16, 24, 30
Output for 5.4.37
Laimīgie skaitļi: 2, 9, 17, 29, 32
Output for 5.4.36
Laimīgie skaitļi: 5, 9, 11, 12, 24
Output for 5.4.35
Laimīgie skaitļi: 1, 5, 8, 12, 24
Output for 5.4.34
Laimīgie skaitļi: 4, 10, 16, 22, 29
Output for 5.4.32
Laimīgie skaitļi: 4, 24, 27, 29, 34
Output for 5.4.31
Laimīgie skaitļi: 13, 16, 19, 31, 34
Output for 5.4.30
Laimīgie skaitļi: 3, 11, 13, 24, 26
Output for 5.4.29
Laimīgie skaitļi: 2, 18, 19, 24, 32
Output for 5.4.28
Laimīgie skaitļi: 1, 3, 19, 27, 30
Output for 5.4.27
Laimīgie skaitļi: 1, 13, 23, 24, 34
Output for 5.4.26
Laimīgie skaitļi: 9, 13, 16, 19, 22
Output for 5.4.25
Laimīgie skaitļi: 5, 18, 22, 25, 31
Output for 5.4.24
Laimīgie skaitļi: 1, 14, 24, 25, 29
Output for 5.4.23
Laimīgie skaitļi: 12, 21, 26, 28, 33
Output for 5.4.22
Laimīgie skaitļi: 5, 12, 17, 24, 35
Output for 5.4.21
Laimīgie skaitļi: 6, 10, 12, 16, 22
Output for 5.4.20
Laimīgie skaitļi: 2, 3, 16, 21, 29
Output for 5.4.19
Laimīgie skaitļi: 2, 6, 11, 12, 33
Output for 5.4.18
Laimīgie skaitļi: 19, 20, 26, 29, 32
Output for 5.4.17
Laimīgie skaitļi: 1, 16, 18, 20, 30
Output for 5.4.16
Laimīgie skaitļi: 8, 11, 14, 21, 31
Output for 5.4.15
Laimīgie skaitļi: 1, 10, 13, 16, 29
Output for 5.4.14
Laimīgie skaitļi: 5, 7, 28, 32, 34
Output for 5.4.13
Laimīgie skaitļi: 5, 22, 28, 32, 35
Output for 5.4.12
Laimīgie skaitļi: 1, 17, 23, 29, 33
Output for 5.4.11
Laimīgie skaitļi: 1, 2, 28, 32, 33
Output for 5.4.10
Laimīgie skaitļi: 8, 9, 11, 14, 20
Output for 5.4.9
Laimīgie skaitļi: 12, 14, 26, 30, 34
Output for 5.4.8
Laimīgie skaitļi: 1, 7, 14, 24, 29
Output for 5.4.7
Laimīgie skaitļi: 2, 6, 16, 19, 21
Output for 5.4.6
Laimīgie skaitļi: 3, 5, 16, 19, 22
Output for 5.4.5
Laimīgie skaitļi: 1, 12, 14, 34, 35
Output for 5.4.4
Laimīgie skaitļi: 7, 10, 23, 29, 33
Output for 5.4.3
Laimīgie skaitļi: 6, 7, 22, 26, 34
Output for 5.4.2
Laimīgie skaitļi: 2, 11, 13, 14, 20
Output for 5.4.1
Laimīgie skaitļi: 1, 5, 20, 22, 28
Output for 5.4.0
Laimīgie skaitļi: 14, 21, 26, 29, 30
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Y8CTS on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/Y8CTS on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Y8CTS on line 3
Process exited with code 255.