3v4l.org

run code in 300+ PHP versions simultaneously
<?php function usercolor( $username ) { $range = 192 - 64; $factor = $range / 256; $offset = 64; $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) / 16) * 16; $f_G = floor((floor($b_G * $factor) + $offset) / 16) * 16; $f_B = floor((floor($b_B * $factor) + $offset) / 16) * 16; return printf('#%02x%02x%02x', $f_R, $f_G, $f_B, false); } 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.2.00.0030.01019.71
7.1.70.0030.00617.10
7.1.60.0100.01619.82
7.1.50.0220.01034.84
7.1.00.0070.07022.44
7.0.200.0250.00314.67
7.0.140.0100.06722.15
7.0.110.0100.04020.08
7.0.100.0100.07020.05
7.0.90.0070.06719.92
7.0.80.0030.06720.04
7.0.70.0070.05019.95
7.0.60.0070.08019.97
7.0.50.0070.07320.02
7.0.40.0100.07319.75
7.0.30.0000.04719.81
7.0.20.0030.04719.74
7.0.10.0030.08019.64
7.0.00.0230.07019.84
5.6.280.0000.07721.09
5.6.260.0000.05020.68
5.6.250.0070.07320.70
5.6.240.0000.05020.70
5.6.230.0000.08320.70
5.6.220.0070.03020.70
5.6.210.0070.04320.69
5.6.200.0070.04720.86
5.6.190.0130.07320.65
5.6.180.0070.08020.59
5.6.170.0100.07720.66
5.6.160.0100.06720.55
5.6.150.0070.08320.64
5.6.140.0070.08020.66
5.6.130.0030.07320.64
5.6.120.0130.07320.59
5.6.110.0030.04320.69
5.6.100.0070.04320.58
5.6.90.0030.04320.64
5.6.80.0000.04720.08
5.6.70.0070.03719.96
5.6.60.0070.03720.00
5.6.50.0030.04019.99
5.6.40.0030.06720.05
5.6.30.0030.04020.06
5.6.20.0100.03319.98
5.6.10.0100.03320.21
5.6.00.0030.03319.99
5.5.380.0000.04317.59
5.5.370.0030.06017.68
5.5.360.0000.04317.60
5.5.350.0100.07017.65
5.5.340.0100.03718.25
5.5.330.0030.08018.13
5.5.320.0000.08017.92
5.5.310.0070.07018.09
5.5.300.0030.07718.24
5.5.290.0030.05718.11
5.5.280.0030.04318.09
5.5.270.0030.04018.22
5.5.260.0030.04018.09
5.5.250.0000.04718.05
5.5.240.0030.03317.31
5.5.230.0030.05017.29
5.5.220.0000.05717.29
5.5.210.0000.04017.34
5.5.200.0000.06317.61
5.5.190.0030.04017.48
5.5.180.0000.04017.27
5.5.160.0030.03717.58
5.5.150.0030.04317.60
5.5.140.0030.03717.57
5.5.130.0030.03717.40
5.5.120.0030.03717.45
5.5.110.0130.03017.48
5.5.100.0030.03717.38
5.5.90.0000.04017.34
5.5.80.0030.03317.18
5.5.70.0000.04717.31
5.5.60.0030.05717.34
5.5.50.0030.03717.34
5.5.40.0030.03717.33
5.5.30.0030.04017.34
5.5.20.0030.03717.37
5.5.10.0070.07717.32
5.5.00.0030.07017.33
5.4.450.0170.03319.34
5.4.440.0000.04319.49
5.4.430.0100.03319.27
5.4.420.0070.03719.32
5.4.410.0000.04019.19
5.4.400.0000.04019.18
5.4.390.0030.03719.18
5.4.380.0100.07319.24
5.4.370.0070.08019.14
5.4.360.0030.04019.31
5.4.350.0070.04319.31
5.4.340.0000.06319.22
5.4.320.0000.04019.09
5.4.310.0030.03719.31
5.4.300.0000.04019.22
5.4.290.0100.03018.96
5.4.280.0070.04319.18
5.4.270.0070.03318.98
5.4.260.0030.04319.24
5.4.250.0070.04019.01
5.4.240.0030.04319.13
5.4.230.0030.04019.31
5.4.220.0070.03018.98
5.4.210.0030.03718.97
5.4.200.0030.03318.94
5.4.190.0030.04319.17
5.4.180.0000.04019.32
5.4.170.0100.07318.99
5.4.160.0070.03719.07
5.4.150.0030.07319.01
5.4.140.0130.04316.59
5.4.130.0100.04016.54
5.4.120.0130.06316.37
5.4.110.0100.03716.52
5.4.100.0030.05016.51
5.4.90.0070.03716.57
5.4.80.0170.04316.58
5.4.70.0000.06016.54
5.4.60.0070.07016.34
5.4.50.0030.04016.18
5.4.40.0070.08316.57
5.4.30.0030.04016.52
5.4.20.0100.05316.56
5.4.10.0030.05016.54
5.4.00.0070.03715.81
5.3.290.0100.06014.67
5.3.280.0000.04014.57
5.3.270.0100.04714.57
5.3.260.0070.07314.64
5.3.250.0100.05314.61
5.3.240.0130.06714.65
5.3.230.0070.05014.62
5.3.220.0030.04014.58
5.3.210.0100.07014.60
5.3.200.0070.07314.66
5.3.190.0030.06714.60
5.3.180.0070.07314.59
5.3.170.0070.06014.71
5.3.160.0100.05714.59
5.3.150.0100.06314.66
5.3.140.0030.07714.54
5.3.130.0000.04314.51
5.3.120.0000.04714.68
5.3.110.0030.05014.79
5.3.100.0100.04314.04
5.3.90.0130.05314.04
5.3.80.0000.04014.16
5.3.70.0030.07714.04
5.3.60.0030.03714.09
5.3.50.0030.07314.10
5.3.40.0070.08014.18
5.3.30.0000.05314.02
5.3.20.0000.05713.71
5.3.10.0070.05713.79
5.3.00.0070.03713.79
5.2.170.0030.06012.14
5.2.160.0030.06012.14
5.2.150.0130.05312.14
5.2.140.0070.05312.14
5.2.130.0070.04712.14
5.2.120.0130.04712.14
5.2.110.0030.04712.14
5.2.100.0000.03712.14
5.2.90.0030.03012.14
5.2.80.0000.04012.14
5.2.70.0000.06712.14
5.2.60.0070.06012.14
5.2.50.0030.03312.14
5.2.40.0030.02312.14
5.2.30.0000.03312.14
5.2.20.0030.03312.14
5.2.10.0030.06312.14
5.2.00.0000.04012.14
5.1.60.0000.05012.14
5.1.50.0000.03312.14
5.1.40.0070.02312.14
5.1.30.0000.03012.14
5.1.20.0000.03712.14
5.1.10.0100.05012.14
5.1.00.0030.05312.14
5.0.50.0070.04012.14
5.0.40.0070.02712.14
5.0.30.0030.05712.14
5.0.20.0000.04312.14
5.0.10.0070.04312.14
5.0.00.0130.05712.14
4.4.90.0070.02712.14
4.4.80.0070.03312.14
4.4.70.0000.01712.14
4.4.60.0070.03312.14
4.4.50.0100.03012.14
4.4.40.0000.05712.14
4.4.30.0070.01012.14
4.4.20.0030.03712.14
4.4.10.0070.03012.14
4.4.00.0100.04712.14
4.3.110.0130.02012.14
4.3.100.0070.03012.14
4.3.90.0070.02712.14
4.3.80.0070.04312.14
4.3.70.0000.03712.14
4.3.60.0030.02012.14
4.3.50.0030.03712.14
4.3.40.0030.02712.14
4.3.30.0000.01712.14
4.3.20.0030.04012.14
4.3.10.0000.03312.14
4.3.00.0000.03012.14

preferences:
37.65 ms | 401 KiB | 5 Q