3v4l.org

run code in 300+ PHP versions simultaneously
<?php function BallRand() { mt_srand(); $ball1 = mt_rand(1,99); $ball2 = mt_rand(1,99); if($ball2 == $ball1): $ball2 = mt_rand(1,99); endif; $ball3 = mt_rand(1,99); if($ball3 == $ball1 || $ball3 == $ball2): $ball3 = mt_rand(1,99); endif; $ball4 = mt_rand(1,99); if($ball4 == $ball1 || $ball4 == $ball2 || $ball4 == $ball3): $ball4 = mt_rand(1,99); endif; $ball5 = mt_rand(1,99); if($ball5 == $ball1 || $ball5 == $ball2 || $ball5 == $ball3 || $ball5 == $ball4): $ball5 = mt_rand(1,99); endif; mt_srand(); $bonus_ball = mt_rand(1,11); echo "$ball1#$ball2#$ball3#$ball4#$ball5|$bonus_ball\n"; echo "$ball1\n"; echo "$ball2\n"; echo "$ball3\n"; echo "$ball4\n"; echo "$ball5\n"; echo "$bonus_ball\n"; } echo BallRand() ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.10.0110.00715.17
7.4.00.0040.01315.11
7.3.130.0140.00314.64
7.3.120.0030.01214.92
7.3.110.0060.00814.89
7.3.100.0080.00514.82
7.3.90.0050.01014.72
7.3.80.0030.00814.92
7.3.70.0030.01214.93
7.3.60.0080.00714.74
7.3.50.0050.00814.76
7.3.40.0020.01314.91
7.3.30.0070.00514.76
7.3.20.0060.00816.64
7.3.10.0080.00616.60
7.3.00.0100.00616.67
7.2.260.0040.01414.77
7.2.250.0020.01415.03
7.2.240.0050.01114.85
7.2.230.0040.01514.90
7.2.220.0090.00615.06
7.2.210.0080.00314.93
7.2.200.0070.00715.11
7.2.190.0030.01114.98
7.2.180.0080.00515.07
7.2.170.0060.00914.88
7.2.160.0030.00915.02
7.2.150.0070.00716.85
7.2.140.0030.00616.59
7.2.130.0090.00916.86
7.2.120.0080.00716.75
7.2.110.0070.00716.91
7.2.100.0050.00816.83
7.2.90.0060.00716.92
7.2.80.0050.00616.77
7.2.70.0090.00516.80
7.2.60.0060.00816.90
7.2.50.0050.00816.91
7.2.40.0080.00717.01
7.2.30.0090.00617.02
7.2.20.0020.01316.79
7.2.10.0080.00916.87
7.2.00.0080.00616.85
7.1.330.0060.00815.69
7.1.320.0020.00715.77
7.1.310.0040.00615.77
7.1.300.0070.00715.77
7.1.290.0050.00715.67
7.1.280.0050.00915.77
7.1.270.0030.01215.78
7.1.260.0020.01215.60
7.1.250.0120.00415.66
7.1.240.0040.01415.66
7.1.230.0060.00915.59
7.1.220.0130.00015.88
7.1.210.0060.00915.52
7.1.200.0000.01015.86
7.1.190.0000.01415.90
7.1.180.0070.00715.57
7.1.170.0110.00415.81
7.1.160.0000.00915.71
7.1.150.0030.01015.84
7.1.140.0100.00715.86
7.1.130.0060.00915.66
7.1.120.0040.00815.77
7.1.110.0070.00715.72
7.1.100.0090.00615.73
7.1.90.0030.01015.70
7.1.80.0110.00315.90
7.1.70.0080.00516.36
7.1.60.0080.01217.53
7.1.50.0100.00516.07
7.1.40.0070.00715.52
7.1.30.0090.00615.85
7.1.20.0030.00915.77
7.1.10.0070.00715.80
7.1.00.0040.04219.07
7.0.330.0070.00715.41
7.0.320.0040.01115.45
7.0.310.0100.00315.48
7.0.300.0050.00515.29
7.0.290.0110.00015.43
7.0.280.0030.01215.32
7.0.270.0070.01115.38
7.0.260.0070.00715.57
7.0.250.0070.01015.19
7.0.240.0030.01015.48
7.0.230.0070.01015.39
7.0.220.0040.00715.35
7.0.210.0040.01115.34
7.0.200.0060.00615.92
7.0.190.0100.00715.55
7.0.180.0000.01515.46
7.0.170.0040.01115.30
7.0.160.0070.00715.36
7.0.150.0030.00715.52
7.0.140.0030.04118.71
7.0.130.0000.01115.42
7.0.120.0030.00615.55
7.0.110.0070.00715.49
7.0.100.0070.03217.74
7.0.90.0080.03317.63
7.0.80.0100.04117.48
7.0.70.0100.03517.56
7.0.60.0080.03717.80
7.0.50.0030.02417.85
7.0.40.0050.02616.93
7.0.30.0050.03816.74
7.0.20.0030.02716.88
7.0.10.0050.02316.86
7.0.00.0070.02216.83
5.6.400.0030.01014.18
5.6.390.0070.01014.37
5.6.380.0000.00814.15
5.6.370.0000.01214.56
5.6.360.0030.00914.23
5.6.350.0070.00414.46
5.6.340.0070.00713.91
5.6.330.0000.01614.41
5.6.320.0060.00914.27
5.6.310.0060.00814.45
5.6.300.0070.00314.61
5.6.290.0080.00514.46
5.6.280.0070.03617.78
5.6.270.0060.00614.49
5.6.260.0060.00614.43
5.6.250.0100.04317.39
5.6.240.0140.03617.62
5.6.230.0150.04017.57
5.6.220.0030.03417.51
5.6.210.0070.02217.35
5.6.200.0120.02017.69
5.6.190.0080.03317.72
5.6.180.0090.04117.71
5.6.170.0140.02317.69
5.6.160.0030.04117.82
5.6.150.0050.02417.80
5.6.140.0020.02817.72
5.6.130.0080.03517.66
5.6.120.0110.02417.88
5.6.110.0040.03117.84
5.6.100.0070.02517.54
5.6.90.0050.03017.63
5.6.80.0070.02217.45
5.6.70.0070.02217.29
5.6.60.0020.02517.23
5.6.50.0050.03817.29
5.6.40.0080.04517.35
5.6.30.0060.04317.34
5.6.20.0030.04517.28
5.6.10.0130.03617.41
5.6.00.0050.04517.34
5.5.380.0110.04417.45
5.5.370.0080.03617.24
5.5.360.0060.02417.29
5.5.350.0080.02317.48
5.5.340.0090.03517.41
5.5.330.0050.03317.67
5.5.320.0080.02317.56
5.5.310.0070.02917.79
5.5.300.0050.02717.50
5.5.290.0050.02717.62
5.5.280.0090.02117.42
5.5.270.0020.02917.60
5.5.260.0070.02317.60
5.5.250.0030.04117.27
5.5.240.0060.02317.16
5.5.230.0100.02017.30
5.5.220.0030.04217.26
5.5.210.0050.03517.16
5.5.200.0100.04217.22
5.5.190.0050.04517.04
5.5.180.0030.04816.95
5.5.170.0060.00914.18
5.5.160.0100.04517.09
5.5.150.0050.04417.15
5.5.140.0080.04316.98
5.5.130.0050.03817.23
5.5.120.0100.04017.16
5.5.110.0080.03717.15
5.5.100.0080.04317.10
5.5.90.0080.03916.95
5.5.80.0080.04217.11
5.5.70.0080.04117.20
5.5.60.0050.04417.12
5.5.50.0050.04517.21
5.5.40.0050.02717.27
5.5.30.0100.03317.13
5.5.20.0080.04016.98
5.5.10.0060.04316.98
5.5.00.0050.04617.03
5.4.450.0020.03314.98
5.4.440.0060.02115.04
5.4.430.0030.02315.27
5.4.420.0080.02515.31
5.4.410.0050.02015.01
5.4.400.0020.02414.88
5.4.390.0070.04215.05
5.4.380.0090.02214.99
5.4.370.0060.03415.25
5.4.360.0060.04015.16
5.4.350.0030.04215.09
5.4.340.0130.03114.78
5.4.330.0030.01011.21
5.4.320.0090.03515.17
5.4.310.0060.03515.05
5.4.300.0050.04215.14
5.4.290.0050.04014.93
5.4.280.0040.04215.03
5.4.270.0120.03315.07
5.4.260.0060.02715.10
5.4.250.0050.03814.93
5.4.240.0070.03815.08
5.4.230.0070.03715.03
5.4.220.0020.04214.78
5.4.210.0050.03515.19
5.4.200.0120.03515.03
5.4.190.0050.04014.91
5.4.180.0080.03515.18
5.4.170.0080.03315.09
5.4.160.0130.02715.02
5.4.150.0090.03614.93
5.4.140.0030.04313.80
5.4.130.0070.03513.71
5.4.120.0100.03813.79
5.4.110.0080.03513.68
5.4.100.0080.03313.74
5.4.90.0070.03813.79
5.4.80.0000.04313.65
5.4.70.0090.03613.49
5.4.60.0000.04613.61
5.4.50.0140.03013.77
5.4.40.0050.03713.67
5.4.30.0070.03513.70
5.4.20.0050.03813.74
5.4.10.0070.03713.63
5.4.00.0070.03513.47
5.3.290.0070.07714.82
5.3.280.0130.07014.50
5.3.270.0100.07314.74
5.3.260.0100.07314.70
5.3.250.0100.07714.69
5.3.240.0100.07714.63
5.3.230.0070.08014.55
5.3.220.0170.06014.59
5.3.210.0100.05714.70
5.3.200.0100.06714.53
5.3.190.0100.07014.69
5.3.180.0070.07714.63
5.3.170.0130.07014.56
5.3.160.0070.06014.69
5.3.150.0130.06714.61
5.3.140.0030.07014.54
5.3.130.0130.07314.63
5.3.120.0130.06714.67
5.3.110.0030.08014.67
5.3.100.0100.07314.18
5.3.90.0070.07314.01
5.3.80.0130.07013.94
5.3.70.0170.07014.15
5.3.60.0070.07314.00
5.3.50.0070.05014.07
5.3.40.0130.07314.07
5.3.30.0030.07314.03
5.3.20.0100.06713.63
5.3.10.0000.06013.70
5.3.00.0170.06313.66
5.2.170.0130.05711.22
5.2.160.0030.06311.18
5.2.150.0000.06711.02
5.2.140.0030.06311.17
5.2.130.0030.06011.18
5.2.120.0030.05711.04
5.2.110.0100.05311.17
5.2.100.0070.06310.98
5.2.90.0030.06011.15
5.2.80.0030.06011.04
5.2.70.0070.06311.02
5.2.60.0030.06310.93
5.2.50.0100.03710.95
5.2.40.0170.05010.93
5.2.30.0030.06011.01
5.2.20.0030.06311.07
5.2.10.0070.05710.94
5.2.00.0070.03310.75
5.1.60.0000.04010.08
5.1.50.0100.05010.02
5.1.40.0100.04710.07
5.1.30.0000.04310.47
5.1.20.0070.05310.50
5.1.10.0030.05710.15
5.1.00.0100.0509.97
5.0.50.0070.0438.89
5.0.40.0030.0408.89
5.0.30.0070.0608.89
5.0.20.0000.0478.89
5.0.10.0030.0438.89
5.0.00.0100.0478.89
4.4.90.0100.0308.89
4.4.80.0070.0338.89
4.4.70.0000.0338.89
4.4.60.0070.0338.89
4.4.50.0030.0338.89
4.4.40.0070.0478.89
4.4.30.0000.0238.89
4.4.20.0030.0338.89
4.4.10.0030.0378.89
4.4.00.0100.0478.89
4.3.110.0000.0208.89
4.3.100.0030.0338.89
4.3.90.0000.0308.89
4.3.80.0070.0508.89
4.3.70.0000.0378.89
4.3.60.0000.0378.89
4.3.50.0030.0378.89
4.3.40.0030.0508.89
4.3.30.0030.0278.89
4.3.20.0000.0408.89
4.3.10.0030.0378.89
4.3.00.0000.0238.89

preferences:
41.71 ms | 401 KiB | 5 Q