3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php printf("PHP_VERSION=%s\n",PHP_VERSION); $min = -(mt_getrandmax()>>1); $max = mt_getrandmax(); $count = isset($argv[1])?(int)$argv[1]:16; printf("min=%d, max=%d, count=%d\n",$min,$max,$count); $repeat_counts = array(); for ($i=0;$i<$count;$i++) { $random = mt_rand($min,$max); if (!isset($repeat_counts[$random])) { $repeat_counts[$random] = 0; } $repeat_counts[$random]++; //printf("%12d%s\n", abs($random),($random<0)?"-":""); } $max_repeat_count = max($repeat_counts); $same_value_max = array(); if ($max_repeat_count > 1) { foreach ($repeat_counts as $value => $repeat_count) { if ($repeat_count >= $max_repeat_count) { $same_value_max[] = $value; } } printf("The following number/s was/were repeated %d times (%s%%): %s\n" ,$max_repeat_count ,number_format(($max_repeat_count/$count)*100.0,1) ,implode(", ",$same_value_max) ); }
Output for 7.1.0
PHP_VERSION=7.1.0 min=-1073741823, max=2147483647, count=16
Output for 7.0.14
PHP_VERSION=7.0.14 min=-1073741823, max=2147483647, count=16
Output for 7.0.11
PHP_VERSION=7.0.11 min=-1073741823, max=2147483647, count=16
Output for 7.0.10
PHP_VERSION=7.0.10 min=-1073741823, max=2147483647, count=16
Output for 7.0.9
PHP_VERSION=7.0.9 min=-1073741823, max=2147483647, count=16
Output for 7.0.8
PHP_VERSION=7.0.8 min=-1073741823, max=2147483647, count=16
Output for 7.0.7
PHP_VERSION=7.0.7 min=-1073741823, max=2147483647, count=16
Output for 7.0.6
PHP_VERSION=7.0.6 min=-1073741823, max=2147483647, count=16
Output for 7.0.5
PHP_VERSION=7.0.5 min=-1073741823, max=2147483647, count=16
Output for 7.0.4
PHP_VERSION=7.0.4 min=-1073741823, max=2147483647, count=16
Output for 7.0.3
PHP_VERSION=7.0.3 min=-1073741823, max=2147483647, count=16
Output for 7.0.2
PHP_VERSION=7.0.2 min=-1073741823, max=2147483647, count=16
Output for 7.0.1
PHP_VERSION=7.0.1 min=-1073741823, max=2147483647, count=16
Output for 7.0.0
PHP_VERSION=7.0.0 min=-1073741823, max=2147483647, count=16
Output for 5.6.28
PHP_VERSION=5.6.28 min=-1073741823, max=2147483647, count=16
Output for 5.6.26
PHP_VERSION=5.6.26 min=-1073741823, max=2147483647, count=16
Output for 5.6.25
PHP_VERSION=5.6.25 min=-1073741823, max=2147483647, count=16
Output for 5.6.24
PHP_VERSION=5.6.24 min=-1073741823, max=2147483647, count=16
Output for 5.6.23
PHP_VERSION=5.6.23 min=-1073741823, max=2147483647, count=16
Output for 5.6.22
PHP_VERSION=5.6.22 min=-1073741823, max=2147483647, count=16
Output for 5.6.21
PHP_VERSION=5.6.21 min=-1073741823, max=2147483647, count=16
Output for 5.6.20
PHP_VERSION=5.6.20 min=-1073741823, max=2147483647, count=16
Output for 5.6.19
PHP_VERSION=5.6.19 min=-1073741823, max=2147483647, count=16
Output for 5.6.18
PHP_VERSION=5.6.18 min=-1073741823, max=2147483647, count=16
Output for 5.6.17
PHP_VERSION=5.6.17 min=-1073741823, max=2147483647, count=16
Output for 5.6.16
PHP_VERSION=5.6.16 min=-1073741823, max=2147483647, count=16
Output for 5.6.15
PHP_VERSION=5.6.15 min=-1073741823, max=2147483647, count=16
Output for 5.6.14
PHP_VERSION=5.6.14 min=-1073741823, max=2147483647, count=16
Output for 5.6.13
PHP_VERSION=5.6.13 min=-1073741823, max=2147483647, count=16
Output for 5.6.12
PHP_VERSION=5.6.12 min=-1073741823, max=2147483647, count=16
Output for 5.6.11
PHP_VERSION=5.6.11 min=-1073741823, max=2147483647, count=16
Output for 5.6.10
PHP_VERSION=5.6.10 min=-1073741823, max=2147483647, count=16
Output for 5.6.9
PHP_VERSION=5.6.9 min=-1073741823, max=2147483647, count=16
Output for 5.6.8
PHP_VERSION=5.6.8 min=-1073741823, max=2147483647, count=16
Output for 5.6.7
PHP_VERSION=5.6.7 min=-1073741823, max=2147483647, count=16
Output for 5.6.6
PHP_VERSION=5.6.6 min=-1073741823, max=2147483647, count=16
Output for 5.6.5
PHP_VERSION=5.6.5 min=-1073741823, max=2147483647, count=16
Output for 5.6.4
PHP_VERSION=5.6.4 min=-1073741823, max=2147483647, count=16
Output for 5.6.3
PHP_VERSION=5.6.3 min=-1073741823, max=2147483647, count=16
Output for 5.6.2
PHP_VERSION=5.6.2 min=-1073741823, max=2147483647, count=16
Output for 5.6.1
PHP_VERSION=5.6.1 min=-1073741823, max=2147483647, count=16
Output for 5.6.0
PHP_VERSION=5.6.0 min=-1073741823, max=2147483647, count=16
Output for 5.5.38
PHP_VERSION=5.5.38 min=-1073741823, max=2147483647, count=16
Output for 5.5.37
PHP_VERSION=5.5.37 min=-1073741823, max=2147483647, count=16
Output for 5.5.36
PHP_VERSION=5.5.36 min=-1073741823, max=2147483647, count=16
Output for 5.5.35
PHP_VERSION=5.5.35 min=-1073741823, max=2147483647, count=16
Output for 5.5.34
PHP_VERSION=5.5.34 min=-1073741823, max=2147483647, count=16
Output for 5.5.33
PHP_VERSION=5.5.33 min=-1073741823, max=2147483647, count=16
Output for 5.5.32
PHP_VERSION=5.5.32 min=-1073741823, max=2147483647, count=16
Output for 5.5.31
PHP_VERSION=5.5.31 min=-1073741823, max=2147483647, count=16
Output for 5.5.30
PHP_VERSION=5.5.30 min=-1073741823, max=2147483647, count=16
Output for 5.5.29
PHP_VERSION=5.5.29 min=-1073741823, max=2147483647, count=16
Output for 5.5.28
PHP_VERSION=5.5.28 min=-1073741823, max=2147483647, count=16
Output for 5.5.27
PHP_VERSION=5.5.27 min=-1073741823, max=2147483647, count=16
Output for 5.5.26
PHP_VERSION=5.5.26 min=-1073741823, max=2147483647, count=16
Output for 5.5.25
PHP_VERSION=5.5.25 min=-1073741823, max=2147483647, count=16
Output for 5.5.24
PHP_VERSION=5.5.24 min=-1073741823, max=2147483647, count=16
Output for 5.5.23
PHP_VERSION=5.5.23 min=-1073741823, max=2147483647, count=16
Output for 5.5.22
PHP_VERSION=5.5.22 min=-1073741823, max=2147483647, count=16
Output for 5.5.21
PHP_VERSION=5.5.21 min=-1073741823, max=2147483647, count=16
Output for 5.5.20
PHP_VERSION=5.5.20 min=-1073741823, max=2147483647, count=16
Output for 5.5.19
PHP_VERSION=5.5.19 min=-1073741823, max=2147483647, count=16
Output for 5.5.18
PHP_VERSION=5.5.18 min=-1073741823, max=2147483647, count=16
Output for 5.5.16
PHP_VERSION=5.5.16 min=-1073741823, max=2147483647, count=16
Output for 5.5.15
PHP_VERSION=5.5.15 min=-1073741823, max=2147483647, count=16
Output for 5.5.14
PHP_VERSION=5.5.14 min=-1073741823, max=2147483647, count=16
Output for 5.5.13
PHP_VERSION=5.5.13 min=-1073741823, max=2147483647, count=16
Output for 5.5.12
PHP_VERSION=5.5.12 min=-1073741823, max=2147483647, count=16
Output for 5.5.11
PHP_VERSION=5.5.11 min=-1073741823, max=2147483647, count=16
Output for 5.5.10
PHP_VERSION=5.5.10 min=-1073741823, max=2147483647, count=16
Output for 5.5.9
PHP_VERSION=5.5.9 min=-1073741823, max=2147483647, count=16
Output for 5.5.8
PHP_VERSION=5.5.8 min=-1073741823, max=2147483647, count=16
Output for 5.5.7
PHP_VERSION=5.5.7 min=-1073741823, max=2147483647, count=16
Output for 5.5.6
PHP_VERSION=5.5.6 min=-1073741823, max=2147483647, count=16
Output for 5.5.5
PHP_VERSION=5.5.5 min=-1073741823, max=2147483647, count=16
Output for 5.5.4
PHP_VERSION=5.5.4 min=-1073741823, max=2147483647, count=16
Output for 5.5.3
PHP_VERSION=5.5.3 min=-1073741823, max=2147483647, count=16
Output for 5.5.2
PHP_VERSION=5.5.2 min=-1073741823, max=2147483647, count=16
Output for 5.5.1
PHP_VERSION=5.5.1 min=-1073741823, max=2147483647, count=16
Output for 5.5.0
PHP_VERSION=5.5.0 min=-1073741823, max=2147483647, count=16
Output for 5.4.45
PHP_VERSION=5.4.45 min=-1073741823, max=2147483647, count=16
Output for 5.4.44
PHP_VERSION=5.4.44 min=-1073741823, max=2147483647, count=16
Output for 5.4.43
PHP_VERSION=5.4.43 min=-1073741823, max=2147483647, count=16
Output for 5.4.42
PHP_VERSION=5.4.42 min=-1073741823, max=2147483647, count=16
Output for 5.4.41
PHP_VERSION=5.4.41 min=-1073741823, max=2147483647, count=16
Output for 5.4.40
PHP_VERSION=5.4.40 min=-1073741823, max=2147483647, count=16
Output for 5.4.39
PHP_VERSION=5.4.39 min=-1073741823, max=2147483647, count=16
Output for 5.4.38
PHP_VERSION=5.4.38 min=-1073741823, max=2147483647, count=16
Output for 5.4.37
PHP_VERSION=5.4.37 min=-1073741823, max=2147483647, count=16
Output for 5.4.36
PHP_VERSION=5.4.36 min=-1073741823, max=2147483647, count=16
Output for 5.4.35
PHP_VERSION=5.4.35 min=-1073741823, max=2147483647, count=16
Output for 5.4.34
PHP_VERSION=5.4.34 min=-1073741823, max=2147483647, count=16
Output for 5.4.32
PHP_VERSION=5.4.32 min=-1073741823, max=2147483647, count=16
Output for 5.4.31
PHP_VERSION=5.4.31 min=-1073741823, max=2147483647, count=16
Output for 5.4.30
PHP_VERSION=5.4.30 min=-1073741823, max=2147483647, count=16
Output for 5.4.29
PHP_VERSION=5.4.29 min=-1073741823, max=2147483647, count=16
Output for 5.4.28
PHP_VERSION=5.4.28 min=-1073741823, max=2147483647, count=16
Output for 5.4.27
PHP_VERSION=5.4.27 min=-1073741823, max=2147483647, count=16
Output for 5.4.26
PHP_VERSION=5.4.26 min=-1073741823, max=2147483647, count=16
Output for 5.4.25
PHP_VERSION=5.4.25 min=-1073741823, max=2147483647, count=16
Output for 5.4.24
PHP_VERSION=5.4.24 min=-1073741823, max=2147483647, count=16
Output for 5.4.23
PHP_VERSION=5.4.23 min=-1073741823, max=2147483647, count=16
Output for 5.4.22
PHP_VERSION=5.4.22 min=-1073741823, max=2147483647, count=16
Output for 5.4.21
PHP_VERSION=5.4.21 min=-1073741823, max=2147483647, count=16
Output for 5.4.20
PHP_VERSION=5.4.20 min=-1073741823, max=2147483647, count=16
Output for 5.4.19
PHP_VERSION=5.4.19 min=-1073741823, max=2147483647, count=16
Output for 5.4.18
PHP_VERSION=5.4.18 min=-1073741823, max=2147483647, count=16
Output for 5.4.17
PHP_VERSION=5.4.17 min=-1073741823, max=2147483647, count=16
Output for 5.4.16
PHP_VERSION=5.4.16 min=-1073741823, max=2147483647, count=16
Output for 5.4.15
PHP_VERSION=5.4.15 min=-1073741823, max=2147483647, count=16
Output for 5.4.14
PHP_VERSION=5.4.14 min=-1073741823, max=2147483647, count=16
Output for 5.4.13
PHP_VERSION=5.4.13 min=-1073741823, max=2147483647, count=16
Output for 5.4.12
PHP_VERSION=5.4.12 min=-1073741823, max=2147483647, count=16
Output for 5.4.11
PHP_VERSION=5.4.11 min=-1073741823, max=2147483647, count=16
Output for 5.4.10
PHP_VERSION=5.4.10 min=-1073741823, max=2147483647, count=16
Output for 5.4.9
PHP_VERSION=5.4.9 min=-1073741823, max=2147483647, count=16
Output for 5.4.8
PHP_VERSION=5.4.8 min=-1073741823, max=2147483647, count=16
Output for 5.4.7
PHP_VERSION=5.4.7 min=-1073741823, max=2147483647, count=16
Output for 5.4.6
PHP_VERSION=5.4.6 min=-1073741823, max=2147483647, count=16
Output for 5.4.5
PHP_VERSION=5.4.5 min=-1073741823, max=2147483647, count=16
Output for 5.4.4
PHP_VERSION=5.4.4 min=-1073741823, max=2147483647, count=16
Output for 5.4.3
PHP_VERSION=5.4.3 min=-1073741823, max=2147483647, count=16
Output for 5.4.2
PHP_VERSION=5.4.2 min=-1073741823, max=2147483647, count=16
Output for 5.4.1
PHP_VERSION=5.4.1 min=-1073741823, max=2147483647, count=16
Output for 5.4.0
PHP_VERSION=5.4.0 min=-1073741823, max=2147483647, count=16
Output for 5.3.29
PHP_VERSION=5.3.29 min=-1073741823, max=2147483647, count=16
Output for 5.3.28
PHP_VERSION=5.3.28 min=-1073741823, max=2147483647, count=16
Output for 5.3.27
PHP_VERSION=5.3.27 min=-1073741823, max=2147483647, count=16
Output for 5.3.26
PHP_VERSION=5.3.26 min=-1073741823, max=2147483647, count=16
Output for 5.3.25
PHP_VERSION=5.3.25 min=-1073741823, max=2147483647, count=16
Output for 5.3.24
PHP_VERSION=5.3.24 min=-1073741823, max=2147483647, count=16
Output for 5.3.23
PHP_VERSION=5.3.23 min=-1073741823, max=2147483647, count=16
Output for 5.3.22
PHP_VERSION=5.3.22 min=-1073741823, max=2147483647, count=16
Output for 5.3.21
PHP_VERSION=5.3.21 min=-1073741823, max=2147483647, count=16
Output for 5.3.20
PHP_VERSION=5.3.20 min=-1073741823, max=2147483647, count=16
Output for 5.3.19
PHP_VERSION=5.3.19 min=-1073741823, max=2147483647, count=16
Output for 5.3.18
PHP_VERSION=5.3.18 min=-1073741823, max=2147483647, count=16
Output for 5.3.17
PHP_VERSION=5.3.17 min=-1073741823, max=2147483647, count=16
Output for 5.3.16
PHP_VERSION=5.3.16 min=-1073741823, max=2147483647, count=16
Output for 5.3.15
PHP_VERSION=5.3.15 min=-1073741823, max=2147483647, count=16
Output for 5.3.14
PHP_VERSION=5.3.14 min=-1073741823, max=2147483647, count=16
Output for 5.3.13
PHP_VERSION=5.3.13 min=-1073741823, max=2147483647, count=16
Output for 5.3.12
PHP_VERSION=5.3.12 min=-1073741823, max=2147483647, count=16
Output for 5.3.11
PHP_VERSION=5.3.11 min=-1073741823, max=2147483647, count=16
Output for 5.3.10
PHP_VERSION=5.3.10 min=-1073741823, max=2147483647, count=16
Output for 5.3.9
PHP_VERSION=5.3.9 min=-1073741823, max=2147483647, count=16
Output for 5.3.8
PHP_VERSION=5.3.8 min=-1073741823, max=2147483647, count=16
Output for 5.3.7
PHP_VERSION=5.3.7 min=-1073741823, max=2147483647, count=16
Output for 5.3.6
PHP_VERSION=5.3.6 min=-1073741823, max=2147483647, count=16
Output for 5.3.5
PHP_VERSION=5.3.5 min=-1073741823, max=2147483647, count=16
Output for 5.3.4
PHP_VERSION=5.3.4 min=-1073741823, max=2147483647, count=16
Output for 5.3.3
PHP_VERSION=5.3.3 min=-1073741823, max=2147483647, count=16
Output for 5.3.2
PHP_VERSION=5.3.2 min=-1073741823, max=2147483647, count=16
Output for 5.3.1
PHP_VERSION=5.3.1 min=-1073741823, max=2147483647, count=16
Output for 5.3.0
PHP_VERSION=5.3.0 min=-1073741823, max=2147483647, count=16
Output for 5.2.17
PHP_VERSION=5.2.17 min=-1073741823, max=2147483647, count=16
Output for 5.2.16
PHP_VERSION=5.2.16 min=-1073741823, max=2147483647, count=16
Output for 5.2.15
PHP_VERSION=5.2.15 min=-1073741823, max=2147483647, count=16
Output for 5.2.14
PHP_VERSION=5.2.14 min=-1073741823, max=2147483647, count=16
Output for 5.2.13
PHP_VERSION=5.2.13 min=-1073741823, max=2147483647, count=16
Output for 5.2.12
PHP_VERSION=5.2.12 min=-1073741823, max=2147483647, count=16
Output for 5.2.11
PHP_VERSION=5.2.11 min=-1073741823, max=2147483647, count=16
Output for 5.2.10
PHP_VERSION=5.2.10 min=-1073741823, max=2147483647, count=16
Output for 5.2.9
PHP_VERSION=5.2.9 min=-1073741823, max=2147483647, count=16
Output for 5.2.8
PHP_VERSION=5.2.8 min=-1073741823, max=2147483647, count=16
Output for 5.2.7
PHP_VERSION=5.2.7 min=-1073741823, max=2147483647, count=16
Output for 5.2.6
PHP_VERSION=5.2.6 min=-1073741823, max=2147483647, count=16
Output for 5.2.5
PHP_VERSION=5.2.5 min=-1073741823, max=2147483647, count=16
Output for 5.2.4
PHP_VERSION=5.2.4 min=-1073741823, max=2147483647, count=16
Output for 5.2.3
PHP_VERSION=5.2.3 min=-1073741823, max=2147483647, count=16
Output for 5.2.2
PHP_VERSION=5.2.2 min=-1073741823, max=2147483647, count=16
Output for 5.2.1
PHP_VERSION=5.2.1 min=-1073741823, max=2147483647, count=16
Output for 5.2.0
PHP_VERSION=5.2.0 min=-1073741823, max=2147483647, count=16
Output for 5.1.6
PHP_VERSION=5.1.6 min=-1073741823, max=2147483647, count=16
Output for 5.1.5
PHP_VERSION=5.1.5 min=-1073741823, max=2147483647, count=16
Output for 5.1.4
PHP_VERSION=5.1.4 min=-1073741823, max=2147483647, count=16
Output for 5.1.3
PHP_VERSION=5.1.3 min=-1073741823, max=2147483647, count=16
Output for 5.1.2
PHP_VERSION=5.1.2 min=-1073741823, max=2147483647, count=16
Output for 5.1.1
PHP_VERSION=5.1.1 min=-1073741823, max=2147483647, count=16
Output for 5.1.0
PHP_VERSION=5.1.0 min=-1073741823, max=2147483647, count=16
Output for 5.0.5
PHP_VERSION=5.0.5 min=-1073741823, max=2147483647, count=16
Output for 5.0.4
PHP_VERSION=5.0.4 min=-1073741823, max=2147483647, count=16
Output for 5.0.3
PHP_VERSION=5.0.3 min=-1073741823, max=2147483647, count=16
Output for 5.0.2
PHP_VERSION=5.0.2 min=-1073741823, max=2147483647, count=16
Output for 5.0.1
PHP_VERSION=5.0.1 min=-1073741823, max=2147483647, count=16
Output for 5.0.0
PHP_VERSION=5.0.0 min=-1073741823, max=2147483647, count=16
Output for 4.4.9
PHP_VERSION=4.4.9 min=-1073741823, max=2147483647, count=16
Output for 4.4.8
PHP_VERSION=4.4.8 min=-1073741823, max=2147483647, count=16
Output for 4.4.7
PHP_VERSION=4.4.7 min=-1073741823, max=2147483647, count=16
Output for 4.4.6
PHP_VERSION=4.4.6 min=-1073741823, max=2147483647, count=16
Output for 4.4.5
PHP_VERSION=4.4.5 min=-1073741823, max=2147483647, count=16
Output for 4.4.4
PHP_VERSION=4.4.4 min=-1073741823, max=2147483647, count=16
Output for 4.4.3
PHP_VERSION=4.4.3 min=-1073741823, max=2147483647, count=16
Output for 4.4.2
PHP_VERSION=4.4.2 min=-1073741823, max=2147483647, count=16
Output for 4.4.1
PHP_VERSION=4.4.1 min=-1073741823, max=2147483647, count=16
Output for 4.4.0
PHP_VERSION=4.4.0 min=-1073741823, max=2147483647, count=16
Output for 4.3.11
PHP_VERSION=4.3.11 min=-1073741823, max=2147483647, count=16
Output for 4.3.10
PHP_VERSION=4.3.10 min=-1073741823, max=2147483647, count=16
Output for 4.3.9
PHP_VERSION=4.3.9 min=-1073741823, max=2147483647, count=16
Output for 4.3.8
PHP_VERSION=4.3.8 min=-1073741823, max=2147483647, count=16
Output for 4.3.7
PHP_VERSION=4.3.7 min=-1073741823, max=2147483647, count=16
Output for 4.3.6
PHP_VERSION=4.3.6 min=-1073741823, max=2147483647, count=16
Output for 4.3.5
PHP_VERSION=4.3.5 min=-1073741823, max=2147483647, count=16
Output for 4.3.4
PHP_VERSION=4.3.4 min=-1073741823, max=2147483647, count=16
Output for 4.3.3
PHP_VERSION=4.3.3 min=-1073741823, max=2147483647, count=16
Output for 4.3.2
PHP_VERSION=4.3.2 min=-1073741823, max=2147483647, count=16
Output for 4.3.1
PHP_VERSION=4.3.1 min=-1073741823, max=2147483647, count=16
Output for 4.3.0
PHP_VERSION=4.3.0 min=-1073741823, max=2147483647, count=16