3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rand_min = -getrandmax (); $rand_max = getrandmax (); $c = 1000; for ( $min = $rand_min; $min < 0; $min+=10000000 ) { $diff = $rand_max - abs ( $min ) + 1; $cnt = 0; for ( $i = 0; $i < $c; $i++ ) { $super_random_value = rand ( $min, $rand_max ); if ( $super_random_value == $diff ) $cnt++; } $per = $cnt * 100 / $c; echo "Number '${diff}' was generated ${cnt} times, " . $per . "%, minimum = ${min}\n"; }
based on kocal

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.0000.03514.68
7.4.00.0070.03015.04
7.3.130.0100.02614.65
7.3.120.0110.02814.72
7.3.110.0100.02814.95
7.3.100.0070.02114.74
7.3.90.0100.02714.63
7.3.80.0000.03014.67
7.3.70.0030.02714.72
7.3.60.0070.01814.85
7.3.50.0030.02414.71
7.3.40.0030.02614.54
7.3.30.0030.02614.92
7.3.20.0060.01616.64
7.3.10.0000.02516.53
7.3.00.0100.01716.90
7.2.260.0120.01815.25
7.2.250.0070.02714.94
7.2.240.0030.02315.02
7.2.230.0130.02615.32
7.2.220.0030.03215.07
7.2.210.0070.02015.05
7.2.200.0030.02915.19
7.2.190.0100.01915.02
7.2.180.0000.02514.92
7.2.170.0000.02714.93
7.2.160.0100.01914.89
7.2.150.0030.02616.98
7.2.140.0040.02117.04
7.2.130.0050.02217.18
7.2.120.0060.02116.79
7.2.110.0040.02216.97
7.2.100.0100.02016.78
7.2.90.0080.01516.94
7.2.80.0030.02416.98
7.2.70.0030.02516.97
7.2.60.0030.02816.79
7.2.50.0040.01716.80
7.2.40.0030.02716.95
7.2.30.0070.02416.95
7.2.20.0000.02716.75
7.2.10.0030.02416.80
7.2.00.0030.02217.98
7.1.330.0060.04515.80
7.1.320.0090.04115.88
7.1.310.0100.04015.63
7.1.300.0100.04215.91
7.1.290.0070.05015.66
7.1.280.0030.04215.78
7.1.270.0030.03916.05
7.1.260.0030.04115.72
7.1.250.0000.05915.63
7.1.240.0000.05415.81
7.1.230.0030.04315.93
7.1.220.0070.04015.56
7.1.210.0060.05115.84
7.1.200.0030.04815.93
7.1.190.0040.04115.91
7.1.180.0070.03615.78
7.1.170.0000.05015.58
7.1.160.0100.03715.94
7.1.150.0030.04815.95
7.1.140.0000.04615.91
7.1.130.0070.05015.99
7.1.120.0070.03616.02
7.1.110.0070.03615.70
7.1.100.0170.03516.84
7.1.90.0100.04015.85
7.1.80.0030.04615.78
7.1.70.0000.03516.46
7.1.60.0090.04217.53
7.1.50.0080.04616.48
7.1.40.0070.03815.82
7.1.30.0030.05015.79
7.1.20.0030.04415.60
7.1.10.0030.04715.96
7.1.00.0100.06819.02
7.0.330.0030.05115.29
7.0.320.0070.04015.37
7.0.310.0030.04315.35
7.0.300.0030.04515.57
7.0.290.0030.04115.35
7.0.280.0110.03915.14
7.0.270.0070.03715.46
7.0.260.0060.03815.25
7.0.250.0070.03715.57
7.0.240.0070.03815.48
7.0.230.0030.04715.36
7.0.220.0000.05215.54
7.0.210.0030.04515.17
7.0.200.0090.03516.11
7.0.190.0070.04015.54
7.0.180.0100.04415.60
7.0.170.0030.04815.11
7.0.160.0070.05015.45
7.0.150.0040.03915.49
7.0.140.0030.04615.55
7.0.130.0030.04215.41
7.0.120.0040.03915.64
7.0.110.0030.03815.54
7.0.100.0030.05815.11
7.0.90.0000.04715.31
7.0.80.0000.04215.54
7.0.70.0070.04415.15
7.0.60.0080.07017.68
7.0.50.0080.05016.68
7.0.40.0100.04616.71
7.0.30.0320.05316.87
7.0.20.0170.06616.83
7.0.10.0170.04816.75
7.0.00.0070.04816.79
5.6.400.0030.06914.38
5.6.390.0070.07314.69
5.6.380.0070.07614.48
5.6.370.0030.06914.60
5.6.360.0070.06914.35
5.6.350.0070.06614.36
5.6.340.0060.06714.23
5.6.330.0000.07414.73
5.6.320.0100.06814.36
5.6.310.0030.06814.32
5.6.300.0030.08014.32
5.6.290.0030.07314.58
5.6.280.0080.08917.57
5.6.270.0070.07214.60
5.6.260.0000.07314.28
5.6.250.0070.08414.34
5.6.240.0100.06614.55
5.6.230.0000.07214.30
5.6.220.0070.07614.32
5.6.210.0030.07017.46
5.6.200.0080.08716.27
5.6.190.0050.08617.52
5.6.180.1650.06517.30
5.6.170.0120.06617.48
5.6.160.0020.08817.37
5.6.150.0070.09316.27
5.6.140.0000.07516.21
5.6.130.0100.09216.27
5.6.120.0030.09317.63
5.6.110.0080.08617.63
5.6.100.0120.08617.81
5.6.90.0050.09217.66
5.6.80.0050.07017.35
5.6.70.0150.06217.28
5.6.60.0030.08814.43
5.6.50.0000.08114.48
5.6.40.0030.07414.51
5.6.30.0000.08014.17
5.6.20.0030.09014.19
5.6.10.0100.06914.40
5.6.00.0070.06914.18
5.5.380.0130.06214.19
5.5.370.0070.08014.24
5.5.360.0030.07814.03
5.5.350.0120.09017.36
5.5.340.0070.09816.18
5.5.330.0100.09717.33
5.5.320.0200.06317.49
5.5.310.0220.09117.27
5.5.300.0050.07716.30
5.5.290.0060.07416.07
5.5.280.0070.09817.72
5.5.270.0050.07917.72
5.5.260.0000.07517.56
5.5.250.0130.07817.46
5.5.240.0170.07717.18
5.5.230.0070.07014.29
5.5.220.0070.07514.57
5.5.210.0000.07614.35
5.5.200.0070.08214.35
5.5.190.0070.07614.42
5.5.180.0070.09414.33
5.5.170.0000.07014.02
5.5.160.0000.07714.12
5.5.150.0060.08814.22
5.5.140.0030.07514.05
5.5.130.0030.07814.10
5.5.120.0030.08314.30
5.5.110.0070.07814.33
5.5.100.0000.08514.29
5.5.90.0000.08014.15
5.5.80.0000.08314.17
5.5.70.0000.08614.12
5.5.60.0030.07914.45
5.5.50.0030.07814.41
5.5.40.0000.07814.02
5.5.30.0070.06914.23
5.5.20.0030.07214.10
5.5.10.0030.07414.40
5.5.00.0000.08814.35
5.4.450.0480.10015.37
5.4.440.0370.07915.40
5.4.430.0070.08815.42
5.4.420.0570.03515.36
5.4.410.0720.03715.39
5.4.400.0520.03615.24
5.4.390.0480.04115.21
5.4.380.0580.03615.17
5.4.370.0550.04215.20
5.4.360.0550.04315.18
5.4.350.0550.04415.26
5.4.340.0550.04815.26
5.4.330.0000.06811.27
5.4.320.0550.03715.12
5.4.310.0770.04015.21
5.4.300.0570.03915.26
5.4.290.0570.03615.26
5.4.280.0520.04315.17
5.4.270.0520.04315.11
5.4.260.0570.03715.17
5.4.250.0550.03515.21
5.4.240.0550.03815.21
5.4.230.0580.03015.21
5.4.220.0680.04015.13
5.4.210.0550.04015.16
5.4.200.0680.03214.09
5.4.190.0700.03615.20
5.4.180.0670.03715.20
5.4.170.0750.03615.16
5.4.160.0530.04015.15
5.4.150.0630.03715.14
5.4.140.0520.04313.84
5.4.130.0620.03513.81
5.4.120.0520.03713.88
5.4.110.0550.03813.90
5.4.100.0570.04413.83
5.4.90.0600.04413.90
5.4.80.0580.03713.88
5.4.70.0580.03713.79
5.4.60.0520.03813.90
5.4.50.0550.03913.82
5.4.40.0600.03713.82
5.4.30.0730.03013.82
5.4.20.0500.04913.70
5.4.10.0670.04413.87
5.4.00.0520.03613.42
5.3.290.1430.00014.51
5.3.280.1070.00014.49
5.3.270.1230.00014.61
5.3.260.1100.00014.63
5.3.250.1100.00014.54
5.3.240.1130.00014.49
5.3.230.1170.00014.62
5.3.220.1130.00014.40
5.3.210.1270.00014.50
5.3.200.1400.00014.55
5.3.190.1170.00014.51
5.3.180.1100.00014.35
5.3.170.1200.00014.49
5.3.160.1400.00014.56
5.3.150.1100.00014.47
5.3.140.1100.00014.53
5.3.130.1130.00014.45
5.3.120.1370.00014.56
5.3.110.1200.00014.59
5.3.100.1130.00013.93
5.3.90.1270.00013.91
5.3.80.1100.00014.03
5.3.70.1070.00013.93
5.3.60.1230.00013.93
5.3.50.1200.00013.88
5.3.40.1100.00013.73
5.3.30.1030.00013.94
5.3.20.1170.00013.60
5.3.10.1600.00013.66
5.3.00.1130.00013.54
5.2.170.1400.00011.05
5.2.160.1200.00010.93
5.2.150.1200.00011.15
5.2.140.1230.00011.14
5.2.130.1170.00010.94
5.2.120.1370.00010.89
5.2.110.1130.00010.99
5.2.100.1130.00011.14
5.2.90.1200.00011.03
5.2.80.1130.00011.14
5.2.70.1230.00011.10
5.2.60.1400.00010.89
5.2.50.1500.00011.09
5.2.40.1170.00010.82
5.2.30.1200.00010.82
5.2.20.1130.00010.79
5.2.10.1070.00010.77
5.2.00.1300.00010.80
5.1.60.1100.0009.92
5.1.50.1070.00010.10
5.1.40.1030.0009.99
5.1.30.1230.00010.34
5.1.20.1070.00010.43
5.1.10.1570.0009.98
5.1.00.1270.00010.00
5.0.50.2100.0008.46
5.0.40.1930.0008.45
5.0.30.2230.0008.16
5.0.20.2100.0008.38
5.0.10.1930.0008.04
5.0.00.2170.0008.12
4.4.90.2370.0005.84
4.4.80.1970.0005.79
4.4.70.2100.0005.80
4.4.60.2270.0005.89
4.4.50.2000.0005.78
4.4.40.2430.0005.77
4.4.30.2070.0005.79
4.4.20.2070.0005.84
4.4.10.2030.0006.00
4.4.00.2130.0005.80
4.3.110.2000.0005.72
4.3.100.1900.0005.80
4.3.90.1830.0005.81
4.3.80.2130.0005.68
4.3.70.2000.0005.82
4.3.60.2400.0005.79
4.3.50.2070.0005.70
4.3.40.2000.0005.64
4.3.30.2100.0004.57
4.3.20.5330.0004.44
4.3.10.5500.0004.46
4.3.00.0130.5677.33