3v4l.org

run code in 300+ PHP versions simultaneously
<?php function swift_rgb2hex($rgb,$hash=true) { if($rgb == NULL){ return 'none'; } if($hash) $hex = '#'; $temp = explode('(',$rgb); if(!is_array($temp) || count($temp)<=1){ return $rgb; } $rgb = $temp[1]; $temp = explode(')',$rgb); $rgb = $temp[0]; $rgb = explode(',',$rgb); $hex .= str_pad(dechex($rgb[0]), 2, "0", STR_PAD_LEFT); $hex .= str_pad(dechex($rgb[1]), 2, "0", STR_PAD_LEFT); $hex .= str_pad(dechex($rgb[2]), 2, "0", STR_PAD_LEFT); return $hex; } echo swift_rgb2hex('rgba(0,0,0)'); echo swift_rgb2hex('boom'); echo swift_rgb2hex('FFFFFF'); echo swift_rgb2hex('rgba(0,0,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.0120.00618.30
8.3.50.0100.00921.21
8.3.40.0070.01418.84
8.3.30.0070.00719.23
8.3.20.0000.00720.16
8.3.10.0050.00322.04
8.3.00.0040.00422.27
8.2.180.0070.01116.35
8.2.170.0070.01022.96
8.2.160.0070.00719.16
8.2.150.0000.00824.18
8.2.140.0050.00524.66
8.2.130.0140.00426.16
8.2.120.0050.00319.77
8.2.110.0060.00322.07
8.2.100.0090.00319.21
8.2.90.0050.00319.15
8.2.80.0000.00818.04
8.2.70.0040.00417.50
8.2.60.0040.00418.05
8.2.50.0090.00018.07
8.2.40.0000.00818.34
8.2.30.0040.00418.07
8.2.20.0000.00817.62
8.2.10.0000.00717.83
8.2.00.0100.00017.77
8.1.280.0070.00725.92
8.1.270.0110.00020.41
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00023.81
8.1.230.0070.00419.20
8.1.220.0000.00817.74
8.1.210.0000.00918.77
8.1.200.0100.00017.35
8.1.190.0040.00417.43
8.1.180.0000.00818.57
8.1.170.0040.00418.65
8.1.160.0000.00722.07
8.1.150.0040.00418.72
8.1.140.0000.00817.36
8.1.130.0040.00417.84
8.1.120.0000.00717.53
8.1.110.0050.00317.46
8.1.100.0000.00717.53
8.1.90.0050.00317.54
8.1.80.0050.00317.53
8.1.70.0000.00717.38
8.1.60.0090.00017.62
8.1.50.0050.00217.54
8.1.40.0040.00417.46
8.1.30.0040.00417.66
8.1.20.0050.00317.57
8.1.10.0070.00317.63
8.1.00.0050.00217.44
8.0.300.0040.00418.77
8.0.290.0040.00416.93
8.0.280.0030.00318.42
8.0.270.0070.00017.28
8.0.260.0070.00016.77
8.0.250.0030.00316.87
8.0.240.0000.01016.97
8.0.230.0040.00417.04
8.0.220.0000.00716.91
8.0.210.0070.00016.78
8.0.200.0000.01016.98
8.0.190.0070.00016.88
8.0.180.0040.00416.95
8.0.170.0000.00816.86
8.0.160.0050.00216.78
8.0.150.0080.00016.73
8.0.140.0000.00816.84
8.0.130.0030.00313.39
8.0.120.0070.00016.88
8.0.110.0030.00416.85
8.0.100.0070.00016.93
8.0.90.0000.00816.97
8.0.80.0090.00916.91
8.0.70.0040.00416.81
8.0.60.0070.00016.79
8.0.50.0000.00716.88
8.0.30.0090.00916.92
8.0.20.0090.01017.40
8.0.10.0070.00017.05
8.0.00.0120.00916.92
7.4.330.0000.00615.00
7.4.320.0000.00616.66
7.4.300.0030.00316.55
7.4.290.0000.00716.55
7.4.280.0000.00716.50
7.4.270.0070.00016.43
7.4.260.0030.00316.48
7.4.250.0040.00416.53
7.4.240.0030.00316.57
7.4.230.0000.00616.45
7.4.220.0060.01016.51
7.4.210.0090.00816.46
7.4.200.0030.00316.42
7.4.190.0040.00416.71
7.4.160.0060.01016.47
7.4.150.0120.01117.40
7.4.140.0090.00917.86
7.4.130.0170.00316.55
7.4.120.0110.00816.57
7.4.110.0040.01516.49
7.4.100.0090.01516.64
7.4.90.0080.00816.45
7.4.80.0140.00719.39
7.4.70.0150.00616.46
7.4.60.0100.00716.53
7.4.50.0040.00416.32
7.4.40.0110.00422.77
7.4.30.0100.01016.44
7.4.00.0070.01015.05
7.3.330.0020.00313.41
7.3.320.0020.00213.15
7.3.310.0000.00716.43
7.3.300.0000.00716.35
7.3.290.0030.01716.34
7.3.280.0080.00816.34
7.3.270.0070.01117.40
7.3.260.0100.00916.47
7.3.250.0090.00816.38
7.3.240.0120.00616.42
7.3.230.0190.00316.68
7.3.210.0110.00616.30
7.3.200.0100.01319.39
7.3.190.0110.00716.51
7.3.180.0090.00616.49
7.3.170.0120.00416.50
7.3.160.0100.01016.36
7.3.120.0030.01114.84
7.3.110.0060.01014.96
7.3.100.0050.00714.99
7.3.90.0070.00515.03
7.3.80.0050.00714.68
7.3.70.0020.01114.92
7.3.60.0060.00714.90
7.3.50.0070.00514.89
7.3.40.0080.00814.67
7.3.30.0090.00314.68
7.3.20.0050.00716.65
7.3.10.0060.00516.69
7.3.00.0070.00716.71
7.2.330.0060.01216.51
7.2.320.0080.01116.86
7.2.310.0100.00716.52
7.2.300.0000.01616.78
7.2.290.0110.00616.77
7.2.250.0050.01114.82
7.2.240.0090.00715.04
7.2.230.0100.00815.02
7.2.220.0060.00815.25
7.2.210.0050.00915.06
7.2.200.0050.00515.20
7.2.190.0050.01014.92
7.2.180.0110.00115.02
7.2.170.0050.01015.10
7.2.00.0030.00719.49
7.1.330.0020.01215.74
7.1.320.0050.00715.93
7.1.310.0060.00915.85
7.1.300.0070.00815.77
7.1.290.0060.00815.81
7.1.280.0100.00415.87
7.1.270.0070.00715.85
7.1.260.0040.00915.88
7.1.100.0070.00718.11
7.1.70.0050.00217.27
7.1.60.0160.00717.37
7.1.50.0180.00716.84
7.1.00.0000.07022.44
7.0.200.0080.01116.52
7.0.140.0130.06322.05
7.0.60.0070.08319.80
7.0.50.0030.05717.96
7.0.40.0130.07020.04
7.0.30.0230.07320.21
7.0.20.0370.06020.30
7.0.10.0370.07320.12
7.0.00.0100.08720.06
5.6.280.0030.07321.01
5.6.210.0100.06720.52
5.6.200.0070.05718.18
5.6.190.0030.06720.61
5.6.180.3470.04020.61
5.6.170.0370.06020.55
5.6.160.0100.07720.48
5.6.150.0070.03718.15
5.6.140.0000.04718.18
5.6.130.0070.08318.18
5.6.120.0100.08021.00
5.6.110.0070.04321.13
5.6.100.0100.07020.99
5.6.90.0100.07320.99
5.6.80.0230.05720.30
5.6.70.0330.06020.48
5.5.350.0130.07720.51
5.5.340.0030.06717.96
5.5.330.0070.08020.13
5.5.320.0230.05020.30
5.5.310.0200.04020.37
5.5.300.0030.06018.08
5.5.290.0070.03718.06
5.5.280.0100.08320.91
5.5.270.0100.04020.77
5.5.260.0000.04720.77
5.5.250.0030.04020.72
5.5.240.0030.07020.20
5.4.450.0730.05719.47
5.4.440.0930.06319.47
5.4.430.0030.06319.46
5.4.420.0770.05019.16
5.4.410.0830.06019.32
5.4.400.0330.06018.77
5.4.390.0130.05318.82
5.4.380.0300.05718.51
5.4.370.0200.04718.57
5.4.360.0070.05718.47
5.4.350.0070.04112.02
5.4.340.0070.03912.03
5.4.320.0050.03912.51
5.4.310.0040.03912.51
5.4.300.0040.03812.51
5.4.290.0050.03912.50
5.4.280.0080.03612.41
5.4.270.0060.03812.41
5.4.260.0060.04312.41
5.4.250.0070.08318.79
5.4.240.0100.05718.98
5.4.230.0100.06718.79
5.4.220.0070.06019.00
5.4.210.0030.07719.00
5.4.200.0030.07019.02
5.4.190.0100.05718.74
5.4.180.0170.07318.92
5.4.170.0130.05018.95
5.4.160.0100.07318.99
5.4.150.0030.06018.78
5.4.140.0030.05716.55
5.4.130.0070.05016.43
5.4.120.0170.06716.37
5.4.110.0070.06716.48
5.4.100.0230.05316.41
5.4.90.0170.06316.49
5.4.80.0100.06016.54
5.4.70.0100.05716.36
5.4.60.0070.05016.35
5.4.50.0100.07016.38
5.4.40.0070.05316.53
5.4.30.0100.05716.45
5.4.20.0130.07316.51
5.4.10.0100.05016.53
5.4.00.0130.06315.75
5.3.290.0090.03912.80
5.3.280.0070.05714.70
5.3.270.0070.05714.60
5.3.260.0000.07014.70
5.3.250.0070.07714.61
5.3.240.0130.06314.71
5.3.230.0030.05714.61
5.3.220.0030.05714.68
5.3.210.0130.06714.73
5.3.200.0130.04314.41
5.3.190.0170.05714.66
5.3.180.0170.06014.73
5.3.170.0170.06014.80
5.3.160.0100.05014.75
5.3.150.0230.06014.66
5.3.140.0170.06714.73
5.3.130.0200.04714.73
5.3.120.0100.08014.55
5.3.110.0100.05714.62
5.3.100.0130.05014.02
5.3.90.0070.06013.99
5.3.80.0070.06713.94
5.3.70.0130.06013.86
5.3.60.0100.06714.09
5.3.50.0130.05314.14
5.3.40.0100.06013.79
5.3.30.0100.05314.08
5.3.20.0170.04013.87
5.3.10.0030.05713.74
5.3.00.0070.07313.48
5.2.170.0100.05711.34
5.2.160.0070.05711.25
5.2.150.0100.04011.23
5.2.140.0200.03011.17
5.2.130.0070.04311.10
5.2.120.0130.04010.94
5.2.110.0030.04711.08
5.2.100.0030.05011.08
5.2.90.0000.05011.33
5.2.80.0130.04711.18
5.2.70.0030.04311.19
5.2.60.0030.04311.14
5.2.50.0200.04710.99
5.2.40.0100.04011.19
5.2.30.0100.04310.95
5.2.20.0100.05310.92
5.2.10.0000.05710.83
5.2.00.0170.03010.91
5.1.60.0100.02710.05
5.1.50.0070.0309.85
5.1.40.0070.04310.00
5.1.30.0030.05310.33
5.1.20.0070.05310.45
5.1.10.0130.02710.05
5.1.00.0000.04010.13
5.0.50.0070.0378.55
5.0.40.0030.0278.62
5.0.30.0000.0508.39
5.0.20.0030.0308.40
5.0.10.0000.0478.38
5.0.00.0030.0438.44
4.4.90.0030.0207.44
4.4.80.0000.0337.44
4.4.70.0100.0177.44
4.4.60.0070.0307.44
4.4.50.0070.0277.44
4.4.40.0000.0477.44
4.4.30.0070.0177.44
4.4.20.0100.0207.44
4.4.10.0100.0177.44
4.4.00.0100.0377.44
4.3.110.0030.0237.44
4.3.100.0000.0337.44
4.3.90.0100.0137.44
4.3.80.0030.0407.44
4.3.70.0070.0237.44
4.3.60.0000.0277.44
4.3.50.0070.0207.44
4.3.40.0030.0437.44
4.3.30.0000.0307.44
4.3.20.0000.0337.44
4.3.10.0070.0237.44
4.3.00.0100.0236.74

preferences:
48.52 ms | 401 KiB | 5 Q