3v4l.org

run code in 300+ PHP versions simultaneously
<?php function poisson($mu,$shift) { #returns array of poisson probabilities for scores $x = []; for ($i = 1 ; $i <= $shift ; $i++ ) { array_push($x,0.0); } $pcdf = 0.0; $a = exp(-1*$mu); while ( $pcdf < 0.999999 || count($x) < 5 ) { array_push($x,$a*($mu**(count($x)-$shift))/facdef(count($x)-$shift)); $pcdf+=end($x); } return $x; } echo poisson(1,0); ?>

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)
8.3.60.0150.00318.68
8.3.50.0100.01022.17
8.3.40.0070.00718.96
8.3.30.0060.00918.96
8.3.20.0080.00020.44
8.3.10.0050.00322.15
8.3.00.0040.00419.50
8.2.180.0140.00018.79
8.2.170.0040.01122.96
8.2.160.0170.00320.70
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0090.00020.65
8.2.120.0000.00726.35
8.2.110.0100.00019.52
8.2.100.0000.01117.97
8.2.90.0000.00819.29
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0050.00321.29
8.2.30.0030.00620.83
8.2.20.0030.00617.95
8.2.10.0000.00818.32
8.2.00.0000.00718.20
8.1.280.0140.00425.92
8.1.270.0040.00424.04
8.1.260.0040.00428.09
8.1.250.0030.00628.09
8.1.240.0040.00820.96
8.1.230.0110.00017.71
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.47
8.1.190.0050.00517.35
8.1.180.0030.00618.10
8.1.170.0000.00818.75
8.1.160.0030.00622.13
8.1.150.0050.00319.12
8.1.140.0050.00319.78
8.1.130.0000.00818.02
8.1.120.0050.00317.64
8.1.110.0000.00717.60
8.1.100.0000.00717.54
8.1.90.0000.00817.55
8.1.80.0040.00417.66
8.1.70.0040.00417.54
8.1.60.0090.00317.79
8.1.50.0000.00817.77
8.1.40.0000.00717.71
8.1.30.0050.00317.82
8.1.20.0000.00817.76
8.1.10.0000.00717.74
8.1.00.0000.00817.70
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0000.00818.69
8.0.270.0000.00717.38
8.0.260.0000.00817.41
8.0.250.0050.00217.16
8.0.240.0000.00717.16
8.0.230.0040.00417.21
8.0.220.0040.00417.01
8.0.210.0040.00417.13
8.0.200.0040.00417.21
8.0.190.0000.00717.13
8.0.180.0050.00217.07
8.0.170.0000.00817.09
8.0.160.0030.00417.23
8.0.150.0040.00417.07
8.0.140.0040.00417.00
8.0.130.0050.00013.59
8.0.120.0090.00017.17
8.0.110.0040.00417.15
8.0.100.0000.00816.98
8.0.90.0000.00817.34
8.0.80.0120.00317.00
8.0.70.0000.00717.00
8.0.60.0040.00417.13
8.0.50.0000.00717.10
8.0.30.0050.01217.38
8.0.20.0090.01017.45
8.0.10.0070.00017.26
8.0.00.0120.00717.04
7.4.330.0060.00016.80
7.4.320.0000.00616.66
7.4.300.0030.00316.76
7.4.290.0070.00016.73
7.4.280.0030.00616.76
7.4.270.0030.00316.81
7.4.260.0040.00416.61
7.4.250.0070.00016.82
7.4.240.0040.00416.74
7.4.230.0030.00316.82
7.4.220.0100.01016.68
7.4.210.0140.00016.78
7.4.200.0070.00016.92
7.4.160.0040.01216.61
7.4.150.0100.01017.40
7.4.140.0120.01317.86
7.4.130.0220.01716.83
7.4.120.0090.01116.78
7.4.110.0100.00716.70
7.4.100.0120.00616.66
7.4.90.0070.01116.66
7.4.80.0100.01319.39
7.4.70.0070.01016.68
7.4.60.0030.01316.61
7.4.50.0070.00716.53
7.4.40.0000.01716.64
7.4.30.0090.00916.75
7.4.00.0050.01115.49
7.3.330.0000.00513.50
7.3.320.0000.00513.58
7.3.310.0070.00016.45
7.3.300.0030.00316.56
7.3.290.0070.00816.46
7.3.280.0100.01016.47
7.3.270.0090.00917.40
7.3.260.0090.01216.94
7.3.250.0110.00816.52
7.3.240.0100.00716.47
7.3.230.0080.00816.46
7.3.210.0140.00916.39
7.3.200.0000.01716.66
7.3.190.0090.00916.63
7.3.180.0090.01416.59
7.3.170.0030.01816.49
7.3.160.0100.01316.56
7.3.120.0130.00615.47
7.3.110.0070.01115.46
7.3.100.0080.00315.17
7.3.90.0040.01215.39
7.3.80.0030.01015.05
7.3.70.0040.01215.46
7.3.60.0090.00015.40
7.3.50.0090.00615.40
7.3.40.0120.00315.34
7.3.30.0060.00315.39
7.3.20.0070.00717.19
7.3.10.0060.00617.02
7.3.00.0050.00817.05
7.2.330.0120.00616.82
7.2.320.0030.01616.89
7.2.310.0090.00916.76
7.2.300.0110.00616.73
7.2.290.0000.01616.82
7.2.250.0000.01815.39
7.2.240.0100.01015.36
7.2.230.0060.00915.60
7.2.220.0060.00915.28
7.2.210.0030.01015.50
7.2.200.0110.00815.32
7.2.190.0030.00715.35
7.2.180.0060.00915.49
7.2.170.0040.01115.57
7.2.130.0070.00717.25
7.2.120.0040.01117.33
7.2.110.0070.00617.51
7.2.100.0080.00417.14
7.2.90.0030.00717.33
7.2.80.0070.01017.51
7.2.70.0070.01017.42
7.2.60.0040.00917.21
7.2.50.0060.00917.36
7.2.40.0110.00417.00
7.2.30.0030.00717.32
7.2.20.0040.01117.07
7.2.10.0030.00717.14
7.2.00.0040.00918.52
7.1.330.0000.01415.94
7.1.320.0070.01116.10
7.1.310.0100.00616.38
7.1.300.0140.00016.18
7.1.290.0040.00716.26
7.1.280.0060.00316.04
7.1.270.0030.00616.19
7.1.260.0070.00716.24
7.1.250.0080.00416.21
7.1.240.0080.00016.18
7.1.230.0130.00315.90
7.1.220.0130.00315.99
7.1.210.0130.00315.92
7.1.200.0090.00615.99
7.1.190.0120.00016.29
7.1.180.0120.00316.20
7.1.170.0090.00916.13
7.1.160.0120.00816.29
7.1.150.0050.00516.27
7.1.140.0100.00316.22
7.1.130.0070.01016.31
7.1.120.0130.00016.00
7.1.110.0030.00916.20
7.1.100.0030.01517.39
7.1.90.0150.00316.26
7.1.80.0030.00916.41
7.1.70.0090.00316.75
7.1.60.0080.01217.66
7.1.50.0080.00816.66
7.1.40.0100.00016.20
7.1.30.0080.01116.27
7.1.20.0110.00415.95
7.1.10.0120.00315.84
7.1.00.0050.04219.43
7.0.330.0000.01115.49
7.0.320.0060.00615.92
7.0.310.0080.00815.48
7.0.300.0070.00715.70
7.0.290.0080.00415.59
7.0.280.0030.01015.82
7.0.270.0040.01115.69
7.0.260.0120.00315.57
7.0.250.0060.00615.78
7.0.240.0070.00715.84
7.0.230.0060.00315.77
7.0.220.0060.00615.65
7.0.210.0030.00915.96
7.0.200.0020.00916.40
7.0.190.0000.01415.72
7.0.180.0040.01115.79
7.0.170.0070.00716.03
7.0.160.0000.00815.95
7.0.150.0100.00715.90
7.0.140.0110.00315.84
7.0.130.0070.00715.68
7.0.120.0000.01515.96
7.0.110.0030.00915.70
7.0.100.0130.00315.91
7.0.90.0100.00315.52
7.0.80.0100.00015.83
7.0.70.0030.00615.90
7.0.60.0030.04318.04
7.0.50.0040.03217.02
7.0.40.0030.02817.19
7.0.30.0120.02317.17
7.0.20.0180.04317.05
7.0.10.0070.03517.22
7.0.00.0080.04217.09
5.6.380.0070.01114.62
5.6.370.0000.00814.86
5.6.360.0090.00614.61
5.6.350.0080.00814.64
5.6.340.0110.00414.88
5.6.330.0060.00614.27
5.6.320.0110.00414.93
5.6.310.0070.01014.69
5.6.300.0080.00814.66
5.6.290.0040.01214.85
5.6.280.0070.03217.59
5.6.270.0110.00314.90
5.6.260.0070.00714.45
5.6.250.0040.01114.81
5.6.240.0060.00914.64
5.6.230.0040.00414.55
5.6.220.0000.01014.76
5.6.210.0080.02617.63
5.6.200.0020.05016.50
5.6.190.0050.02517.65
5.6.180.0240.02417.73
5.6.170.0210.02317.68
5.6.160.0050.03217.84
5.6.150.0080.02216.55
5.6.140.0030.02916.38
5.6.130.0060.02316.51
5.6.120.0070.04417.93
5.6.110.0100.04317.87
5.6.100.0060.04617.94
5.6.90.0050.03017.88
5.6.80.0030.02117.62
5.6.70.0030.01014.63
5.6.60.0060.00314.47
5.6.50.0030.00914.58
5.6.40.0060.00914.39
5.6.30.0040.00714.46
5.6.20.0060.00614.43
5.6.10.0000.01014.73
5.6.00.0120.00014.44
5.5.380.0030.00510.90
5.5.370.0030.00611.07
5.5.360.0090.00011.06
5.5.350.0120.04315.57
5.5.340.0090.02114.25
5.5.330.0100.04015.72
5.5.320.0050.02215.57
5.5.310.0130.03815.46
5.5.300.0030.02714.30
5.5.290.0050.02214.27
5.5.280.0080.04315.91
5.5.270.0050.04315.79
5.5.260.0040.03615.81
5.5.250.0070.04515.53
5.5.240.0150.03615.51
5.5.230.0030.00710.79
5.5.220.0030.00710.61
5.5.210.0110.00010.74
5.5.200.0000.00810.73
5.5.190.0000.01110.64
5.5.180.0040.00810.62
5.5.170.0100.00310.85
5.5.160.0040.00810.59
5.5.150.0000.00810.84
5.5.140.0000.01110.72
5.5.130.0090.00311.00
5.5.120.0080.00310.88
5.5.110.0060.00611.02
5.5.100.0060.00610.95
5.5.90.0000.01110.77
5.5.80.0000.01010.45
5.5.70.0080.00510.70
5.5.60.0040.00410.95
5.5.50.0000.01110.87
5.5.40.0040.00710.98
5.5.30.0030.00910.66
5.5.20.0000.00610.88
5.5.10.0070.00410.90
5.5.00.0030.00610.60

preferences:
58.38 ms | 401 KiB | 5 Q