3v4l.org

run code in 300+ PHP versions simultaneously
<?php function usercolor( $username ) { $range = 192 - 64; $factor = $range / 256; $offset = 16; $base_hash = substr(md5($username), 0, 6); $b_R = hexdec(substr($base_hash,0,2)); $b_G = hexdec(substr($base_hash,2,2)); $b_B = hexdec(substr($base_hash,4,2)); $f_R = floor((floor($b_R * $factor) + $offset) / COL_STEP) * COL_STEP; $f_G = floor((floor($b_G * $factor) + $offset) / COL_STEP) * COL_STEP; $f_B = floor((floor($b_B * $factor) + $offset) / COL_STEP) * COL_STEP; return printf('#%02x%02x%02x', $f_R, $f_G, $f_B); } for( $i=0; $i<30; $i++ ) { printf('<div style="height: 100px; width: 100px; background-color: %s">&nbsp;</div>'."\n", usercolor(rand())); }

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.00.0100.01014.82
7.3.120.0170.00314.94
7.3.110.0120.00614.95
7.3.100.0090.00614.76
7.3.90.0110.00415.04
7.3.80.0040.01114.88
7.3.70.0130.00314.73
7.3.60.0070.00414.77
7.3.50.0080.00814.78
7.3.40.0040.01114.99
7.3.30.0030.00615.02
7.3.20.0100.00316.53
7.3.10.0030.01616.37
7.3.00.0070.00416.46
7.2.250.0100.01015.01
7.2.240.0090.01314.96
7.2.230.0000.01814.98
7.2.220.0030.01415.27
7.2.210.0070.00714.84
7.2.200.0030.01215.03
7.2.190.0070.01015.00
7.2.180.0110.00415.17
7.2.170.0000.01315.02
7.2.00.0000.01419.42
7.1.330.0090.00615.82
7.1.320.0130.00315.69
7.1.310.0000.01015.67
7.1.300.0070.00415.80
7.1.290.0030.01315.50
7.1.280.0070.00715.89
7.1.270.0000.01315.53
7.1.260.0070.01315.59
7.1.70.0030.01417.09
7.1.60.0060.01819.82
7.1.50.0100.01317.23
7.1.00.0070.07322.51
7.0.200.0000.00916.87
7.0.140.0000.07722.01
7.0.100.0200.07019.91
7.0.90.0100.08320.04
7.0.80.0070.05719.96
7.0.70.0130.04320.16
7.0.60.0000.06320.02
7.0.50.0130.04320.32
7.0.40.0130.06320.04
7.0.30.0030.05020.08
7.0.20.0030.05720.08
7.0.10.0030.05020.12
7.0.00.0070.04720.05
5.6.280.0030.07720.92
5.6.250.0100.07320.61
5.6.240.0100.08320.68
5.6.230.0030.08020.76
5.6.220.0030.08320.62
5.6.210.0070.08020.47
5.6.200.0200.06721.18
5.6.190.0100.07021.05
5.6.180.0030.09020.96
5.6.170.0070.07721.02
5.6.160.0070.08021.13
5.6.150.0130.07721.04
5.6.140.0070.05320.96
5.6.130.0070.04020.97
5.6.120.0030.07321.18
5.6.110.0070.04721.05
5.6.100.0100.07721.03
5.6.90.0000.09021.03
5.6.80.0100.07720.43
5.6.70.0030.07720.45
5.6.60.0130.07320.30
5.6.50.0000.09020.43
5.6.40.0100.06020.29
5.6.30.0070.08320.37
5.6.20.0030.04320.40
5.6.10.0070.06020.32
5.6.00.0070.07720.43
5.5.380.0000.05320.38
5.5.370.0130.07320.57
5.5.360.0130.07720.50
5.5.350.0100.07720.49
5.5.340.0070.08020.66
5.5.330.0070.08320.92
5.5.320.0100.04020.88
5.5.310.0030.04320.79
5.5.300.0070.07320.77
5.5.290.0030.04320.84
5.5.280.0030.08720.82
5.5.270.0130.05320.87
5.5.260.0070.05020.78
5.5.250.0100.08020.68
5.5.240.0130.06020.04
5.5.230.0070.06720.14
5.5.220.0030.08720.12
5.5.210.0070.06720.25
5.5.200.0030.08720.16
5.5.190.0030.08320.30
5.5.180.0030.09020.25
5.5.160.0030.08020.29
5.5.150.0070.07720.14
5.5.140.0070.04320.13
5.5.130.0170.06720.16
5.5.120.0030.06720.23
5.5.110.0070.04720.18
5.5.100.0030.07720.17
5.5.90.0100.07320.10
5.5.80.0070.05720.11
5.5.70.0100.08320.08
5.5.60.0070.08019.93
5.5.50.0130.04020.11
5.5.40.0030.05020.07
5.5.30.0130.07319.92
5.5.20.0070.08020.07
5.5.10.0030.04020.09
5.5.00.0070.07720.05
5.4.450.0070.08019.42
5.4.440.0030.08319.36
5.4.430.0070.08319.22
5.4.420.0170.07719.17
5.4.410.0130.07319.32
5.4.400.0100.07719.13
5.4.390.0130.05319.03
5.4.380.0100.07319.23
5.4.370.0000.08019.23
5.4.360.0100.07318.86
5.4.350.0000.08019.04
5.4.340.0030.09319.13
5.4.320.0100.07318.95
5.4.310.0100.07319.21
5.4.300.0070.04319.16
5.4.290.0100.07718.84
5.4.280.0170.07019.02
5.4.270.0100.07018.89
5.4.260.0100.07719.06
5.4.250.0130.07019.03
5.4.240.0100.07318.89
5.4.230.0000.08019.02
5.4.220.0030.06319.13
5.4.210.0000.07719.04
5.4.200.0030.08019.17
5.4.190.0000.08719.19
5.4.180.0000.05319.04
5.4.170.0030.07719.02
5.4.160.0070.08019.10
5.4.150.0030.03719.11
5.4.140.0030.07716.20
5.4.130.0030.07016.41
5.4.120.0100.06316.47
5.4.110.0070.03716.48
5.4.100.0000.04016.32
5.4.90.0000.04016.39
5.4.80.0070.03316.44
5.4.70.0030.03716.52
5.4.60.0100.03316.46
5.4.50.0170.02316.31
5.4.40.0130.05316.41
5.4.30.0130.03016.33
5.4.20.0070.06016.36
5.4.10.0070.05316.35
5.4.00.0030.07315.89
5.3.290.0000.06714.61
5.3.280.0070.07014.67
5.3.270.0070.08014.61
5.3.260.0000.07714.75
5.3.250.0030.07014.62
5.3.240.0030.05314.66
5.3.230.0130.08014.68
5.3.220.0030.08314.61
5.3.210.0030.04314.68
5.3.200.0070.04014.68
5.3.190.0070.04314.50
5.3.180.0000.04014.55
5.3.170.0000.04714.59
5.3.160.0030.03314.50
5.3.150.0000.04314.53
5.3.140.0070.03714.50
5.3.130.0070.03314.61
5.3.120.0000.04014.66
5.3.110.0100.06014.54
5.3.100.0130.06013.99
5.3.90.0000.08014.03
5.3.80.0100.06313.99
5.3.70.0030.03313.96
5.3.60.0000.03714.00
5.3.50.0000.04013.91
5.3.40.0000.04013.93
5.3.30.0070.03713.92
5.3.20.0070.06313.65
5.3.10.0070.03313.60
5.3.00.0070.03713.64
5.2.170.0030.02711.11
5.2.160.0000.04011.16
5.2.150.0070.02311.26
5.2.140.0100.06011.21
5.2.130.0000.04011.11
5.2.120.0100.02711.14
5.2.110.0000.03011.17
5.2.100.0100.02011.17
5.2.90.0030.03311.13
5.2.80.0030.04011.11
5.2.70.0030.02711.11
5.2.60.0100.02011.02
5.2.50.0000.03311.08
5.2.40.0030.03010.94
5.2.30.0030.02711.00
5.2.20.0000.03310.92
5.2.10.0030.02310.73
5.2.00.0070.02710.64
5.1.60.0030.03710.09
5.1.50.0000.02310.01
5.1.40.0070.03310.06
5.1.30.0070.02310.28
5.1.20.0030.02310.50
5.1.10.0000.03010.17
5.1.00.0000.02710.17
5.0.50.0000.0239.27
5.0.40.0000.0209.27
5.0.30.0030.0309.27
5.0.20.0000.0209.27
5.0.10.0000.0209.27
5.0.00.0030.0279.27
4.4.90.0030.0139.27
4.4.80.0000.0179.27
4.4.70.0000.0179.27
4.4.60.0000.0179.27
4.4.50.0030.0139.27
4.4.40.0000.0239.27
4.4.30.0000.0139.27
4.4.20.0000.0179.27
4.4.10.0000.0179.27
4.4.00.0000.0279.27
4.3.110.0000.0179.27
4.3.100.0000.0179.27
4.3.90.0000.0179.27
4.3.80.0000.0279.27
4.3.70.0030.0139.27
4.3.60.0000.0139.27
4.3.50.0030.0139.27
4.3.40.0030.0209.27
4.3.30.0030.0139.27
4.3.20.0030.0139.27
4.3.10.0000.0179.27
4.3.00.0000.0179.27

preferences:
37 ms | 400 KiB | 5 Q