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 sprintf('#%02x%02x%02x', $f_R, $f_G, $f_B); } for( $i=0; $i<30; $i++ ) { $color = usercolor(rand()); echo '<div style="height: 100px; width: 100px; background-color: '.$color.'">'.$color.'</div>'."\n"; }

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.0030.01615.17
7.4.00.0040.01514.98
7.3.130.0060.00814.77
7.3.120.0060.01114.88
7.3.110.0080.01014.79
7.3.100.0050.01014.73
7.3.90.0060.00814.85
7.3.80.0060.00914.82
7.3.70.0070.00514.59
7.3.60.0080.00514.96
7.3.50.0050.00714.87
7.3.40.0050.00814.89
7.3.30.0070.01014.99
7.3.20.0080.00816.68
7.3.10.0060.00916.66
7.3.00.0110.00316.58
7.2.260.0090.00915.09
7.2.250.0070.01115.19
7.2.240.0080.01015.14
7.2.230.0050.00715.28
7.2.220.0020.01415.01
7.2.210.0100.00514.99
7.2.200.0060.01014.87
7.2.190.0080.00715.06
7.2.180.0080.00515.07
7.2.170.0020.01415.12
7.2.160.0040.01515.05
7.2.150.0070.00717.06
7.2.140.0060.00617.02
7.2.130.0080.00416.98
7.2.120.0030.01017.02
7.2.110.0070.01116.85
7.2.100.0070.01016.61
7.2.90.0080.00817.05
7.2.80.0120.00816.94
7.2.70.0130.00716.75
7.2.60.0090.00916.65
7.2.50.0070.00317.00
7.2.40.0060.00316.97
7.2.30.0090.00616.76
7.2.20.0060.01017.03
7.2.10.0100.00016.80
7.2.00.0090.00517.97
7.1.330.0060.00815.64
7.1.320.0080.00715.87
7.1.310.0030.01215.88
7.1.300.0080.00615.67
7.1.290.0060.00915.80
7.1.280.0080.00615.83
7.1.270.0060.00815.77
7.1.260.0070.00515.77
7.1.250.0060.00915.82
7.1.240.0070.00715.68
7.1.230.0000.01615.91
7.1.220.0060.00915.89
7.1.210.0100.00315.71
7.1.200.0100.00715.67
7.1.190.0040.01215.80
7.1.180.0120.00615.84
7.1.170.0100.00315.80
7.1.160.0100.00315.76
7.1.150.0030.00915.99
7.1.140.0060.01115.94
7.1.130.0060.00915.85
7.1.120.0030.00715.80
7.1.110.0100.00715.50
7.1.100.0030.00615.84
7.1.90.0120.00315.75
7.1.80.0000.01415.74
7.1.70.0060.00816.64
7.1.60.0040.01217.92
7.1.50.0040.01516.48
7.1.40.0100.00615.75
7.1.30.0070.00715.77
7.1.20.0070.01015.53
7.1.10.0040.01115.45
7.1.00.0080.03819.07
7.0.330.0030.00615.34
7.0.320.0070.00715.20
7.0.310.0120.00315.51
7.0.300.0070.01115.46
7.0.290.0100.00315.27
7.0.280.0050.00515.22
7.0.270.0100.00315.23
7.0.260.0070.00715.59
7.0.250.0070.00315.41
7.0.240.0030.01015.45
7.0.230.0070.00715.59
7.0.220.0000.01215.56
7.0.210.0000.01015.18
7.0.200.0030.00716.12
7.0.190.0110.00015.38
7.0.180.0090.00615.45
7.0.170.0090.00615.43
7.0.160.0030.01015.25
7.0.150.0000.00815.30
7.0.140.0070.03918.75
7.0.130.0080.00315.38
7.0.120.0000.01415.59
7.0.110.0040.00915.33
7.0.100.0070.00715.41
7.0.90.0090.00315.52
7.0.80.0070.00715.31
7.0.70.0040.00815.30
7.0.60.0080.04117.75
7.0.50.0050.02416.71
7.0.40.0050.04716.81
7.0.30.0210.04316.92
7.0.20.0130.02116.92
7.0.10.0100.02516.89
7.0.00.0040.04916.72
5.6.400.0120.00314.34
5.6.390.0130.00014.25
5.6.380.0040.01114.46
5.6.370.0130.00314.23
5.6.360.0030.01214.23
5.6.350.0070.00414.52
5.6.340.0040.00814.32
5.6.330.0070.01114.35
5.6.320.0030.00514.58
5.6.310.0030.01314.58
5.6.300.0090.00614.78
5.6.290.0040.01114.62
5.6.280.0040.04117.43
5.6.270.0070.00714.39
5.6.260.0120.00314.29
5.6.250.0070.00714.23
5.6.240.0000.01614.36
5.6.230.0060.00914.49
5.6.220.0100.00314.35
5.6.210.0080.03517.34
5.6.200.0050.04516.22
5.6.190.0110.04017.29
5.6.180.2020.02517.66
5.6.170.0100.04217.39
5.6.160.0080.03517.27
5.6.150.0050.02616.34
5.6.140.0120.04016.38
5.6.130.0070.03116.11
5.6.120.0090.04417.80
5.6.110.0130.04517.82
5.6.100.0090.04217.70
5.6.90.0100.04317.64
5.6.80.0100.03817.37
5.6.70.0260.03417.29
5.6.60.0080.00414.23
5.6.50.0070.00414.07
5.6.40.0060.00614.48
5.6.30.0030.01014.29
5.6.20.0050.00514.42
5.6.10.0000.01414.23
5.6.00.0000.01114.06
5.5.380.0040.00814.46
5.5.370.0000.01714.15
5.5.360.0030.00814.34
5.5.350.0020.04717.21
5.5.340.0070.04316.14
5.5.330.0050.02817.30
5.5.320.0140.04417.37
5.5.310.0190.03317.30
5.5.300.0000.02616.21
5.5.290.0050.02316.20
5.5.280.0030.04517.52
5.5.270.0090.04517.61
5.5.260.0100.03917.46
5.5.250.0060.02917.62
5.5.240.0100.03517.26
5.5.230.0030.00713.94
5.5.220.0040.00414.23
5.5.210.0000.01314.46
5.5.200.0070.00714.32
5.5.190.0060.00614.26
5.5.180.0030.00614.22
5.5.170.0030.01014.13
5.5.160.0100.00314.33
5.5.150.0040.00414.12
5.5.140.0060.00614.07
5.5.130.0060.00914.48
5.5.120.0030.00614.19
5.5.110.0060.00614.18
5.5.100.0000.00914.16
5.5.90.0000.00914.07
5.5.80.0000.01614.15
5.5.70.0030.01314.09
5.5.60.0100.00014.29
5.5.50.0000.01014.21
5.5.40.0000.01414.32
5.5.30.0060.00314.13
5.5.20.0000.01614.39
5.5.10.0040.01113.70
5.5.00.0130.00014.28
5.4.450.0430.02515.43
5.4.440.0450.03515.35
5.4.430.0110.02715.37
5.4.420.0030.03515.22
5.4.410.0100.02515.11
5.4.400.0860.00214.86
5.4.390.0850.00314.81
5.4.380.0230.02214.87
5.4.370.0120.02714.69
5.4.360.0150.02614.90
5.4.350.0180.02914.86
5.4.340.0200.02614.74
5.4.330.0100.00310.82
5.4.320.0060.02311.74
5.4.310.0070.02411.72
5.4.300.0070.02011.75
5.4.290.0080.02111.90
5.4.280.0050.02411.62
5.4.270.0070.02914.82
5.4.260.0130.03014.85
5.4.250.0070.02915.00
5.4.240.0060.03314.93
5.4.230.0130.03814.78
5.4.220.0030.03714.98
5.4.210.0050.03414.87
5.4.200.0080.03215.10
5.4.190.0070.03714.80
5.4.180.0100.03114.83
5.4.170.0070.03515.06
5.4.160.0020.03614.85
5.4.150.0100.04215.02
5.4.140.0100.03313.65
5.4.130.0110.02513.77
5.4.120.0070.03713.60
5.4.110.0070.02813.79
5.4.100.0040.03013.71
5.4.90.0040.03013.78
5.4.80.0120.03013.68
5.4.70.0140.03013.61
5.4.60.0070.04013.79
5.4.50.0050.03913.81
5.4.40.0100.02413.73
5.4.30.0030.03213.61
5.4.20.0050.02813.67
5.4.10.0110.03713.65
5.4.00.0070.03013.56
5.3.290.0060.02011.75
5.3.280.0110.03512.61
5.3.270.0030.03312.70
5.3.260.0110.02712.68
5.3.250.0070.03012.64
5.3.240.0050.03812.40
5.3.230.0130.02712.55
5.3.220.0090.03812.52
5.3.210.0100.02712.44
5.3.200.0100.02412.49
5.3.190.0050.02912.56
5.3.180.0080.02612.67
5.3.170.0090.02712.63
5.3.160.0110.03312.73
5.3.150.0070.02912.64
5.3.140.0080.02912.55
5.3.130.0090.03712.48
5.3.120.0100.02812.61
5.3.110.0100.03712.52
5.3.100.0080.03712.29
5.3.90.0050.03112.30
5.3.80.0070.03512.26
5.3.70.0050.03812.19
5.3.60.0070.03512.38
5.3.50.0070.04012.23
5.3.40.0030.04312.35
5.3.30.0130.02512.30
5.3.20.0120.02311.99
5.3.10.0070.02711.96
5.3.00.0020.04112.00
5.2.170.0030.05011.13
5.2.160.0100.03711.23
5.2.150.0100.03711.34
5.2.140.0100.05711.23
5.2.130.0070.05311.08
5.2.120.0070.05311.20
5.2.110.0000.04711.17
5.2.100.0100.03711.29
5.2.90.0000.04711.18
5.2.80.0070.05011.00
5.2.70.0100.04011.18
5.2.60.0130.05011.23
5.2.50.0100.04011.11
5.2.40.0100.05010.99
5.2.30.0030.04310.97
5.2.20.0070.05711.04
5.2.10.0100.03310.93
5.2.00.0000.05010.72
5.1.60.0030.0379.85
5.1.50.0070.04310.07
5.1.40.0100.03010.06
5.1.30.0030.03710.41
5.1.20.0070.05010.59
5.1.10.0100.03310.14
5.1.00.0030.03710.06
5.0.50.0070.0308.57
5.0.40.0070.0278.39
5.0.30.0100.0538.43
5.0.20.0030.0278.45
5.0.10.0000.0338.16
5.0.00.0070.0408.20
4.4.90.0030.0206.91
4.4.80.0030.0206.91
4.4.70.0070.0176.91
4.4.60.0070.0276.91
4.4.50.0030.0236.91
4.4.40.0100.0336.91
4.4.30.0000.0306.91
4.4.20.0030.0306.91
4.4.10.0030.0276.91
4.4.00.0070.0306.91
4.3.110.0070.0206.91
4.3.100.0030.0236.91
4.3.90.0070.0176.91
4.3.80.0030.0476.91
4.3.70.0000.0206.91
4.3.60.0070.0276.91
4.3.50.0070.0176.91
4.3.40.0000.0376.91
4.3.30.0030.0236.91
4.3.20.0000.0276.91
4.3.10.0000.0236.91
4.3.00.0100.0306.35

preferences:
39.34 ms | 401 KiB | 5 Q