3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(hex2rgb("#AADDFF")); function hex2rgb($hex) { //if (substr($hex,0,1)=="#"): // $hex=substr($hex, 1); //endif; $hex = substr_replace($hex,"#",""); if (strlen($hex)==3): $hex=$hex[0].$hex[0].$hex[1].$hex[1].$hex[2].$hex[2]; elseif (strlen($hex)!=6): return false; else: $rgb=array(); $rgb[0] = hexdec(substr($hex,0,2)); // red $rgb[1] = hexdec(substr($hex,2,2)); // green $rgb[2] = hexdec(substr($hex,4,2)); // blue return $rgb; endif; } ?>

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.40.0070.00718.70
8.3.30.0070.01419.02
8.3.20.0040.00420.10
8.3.10.0000.00722.09
8.3.00.0030.00522.43
8.2.170.0090.00622.96
8.2.160.0070.00720.77
8.2.150.0000.00824.18
8.2.140.0040.01124.66
8.2.130.0060.00326.16
8.2.120.0030.00719.24
8.2.110.0030.00620.42
8.2.100.0090.00317.84
8.2.90.0040.00419.27
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00617.80
8.2.50.0040.00418.10
8.2.40.0050.00520.59
8.2.30.0000.00819.24
8.2.20.0020.00517.59
8.2.10.0000.00717.73
8.2.00.0050.00317.72
8.1.270.0050.00322.19
8.1.260.0020.00526.35
8.1.250.0050.00328.09
8.1.240.0030.00621.12
8.1.230.0000.01220.30
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0030.00617.23
8.1.190.0040.00417.10
8.1.180.0070.00018.10
8.1.170.0000.00818.44
8.1.160.0060.00318.69
8.1.150.0000.00720.03
8.1.140.0000.00917.32
8.1.130.0030.00317.80
8.1.120.0040.00417.37
8.1.110.0040.00417.36
8.1.100.0000.00817.21
8.1.90.0030.00417.36
8.1.80.0000.00817.32
8.1.70.0030.00317.30
8.1.60.0040.00417.41
8.1.50.0000.00717.33
8.1.40.0040.00417.48
8.1.30.0030.00517.60
8.1.20.0040.00417.51
8.1.10.0060.00317.41
8.1.00.0000.00817.34
8.0.300.0040.00418.77
8.0.290.0030.00516.62
8.0.280.0040.00418.39
8.0.270.0020.00617.29
8.0.260.0000.00716.82
8.0.250.0000.00716.96
8.0.240.0000.00716.92
8.0.230.0000.00716.98
8.0.220.0030.00316.84
8.0.210.0000.00816.88
8.0.200.0030.00616.96
8.0.190.0030.00616.98
8.0.180.0030.00316.93
8.0.170.0040.00416.89
8.0.160.0020.00516.83
8.0.150.0080.00016.88
8.0.140.0050.00316.89
8.0.130.0030.00313.25
8.0.120.0050.00316.76
8.0.110.0000.00816.79
8.0.100.0030.00516.80
8.0.90.0040.00416.79
8.0.80.0130.00316.80
8.0.70.0020.00516.89
8.0.60.0040.00416.78
8.0.50.0000.00716.96
8.0.30.0140.01117.08
8.0.20.0080.01117.40
8.0.10.0000.00716.92
8.0.00.0070.01016.58
7.4.330.0000.00515.01
7.4.320.0000.00616.50
7.4.300.0060.00016.44
7.4.290.0000.00716.40
7.4.280.0070.00016.40
7.4.270.0060.00016.64
7.4.260.0030.00316.45
7.4.250.0000.00816.59
7.4.240.0000.00716.48
7.4.230.0030.00316.61
7.4.220.0070.01016.50
7.4.210.0090.00516.60
7.4.200.0000.00716.51
7.4.190.0030.00316.53
7.4.160.0130.00316.45
7.4.150.0090.01017.40
7.4.140.0080.01117.86
7.4.130.0060.01116.52
7.4.120.0100.00916.58
7.4.110.0100.00716.69
7.4.100.0070.01816.33
7.4.90.0150.00316.39
7.4.80.0060.00919.39
7.4.70.0100.00716.48
7.4.60.0150.00616.68
7.4.50.0000.00416.63
7.4.40.0060.01222.77
7.4.30.0030.01316.47
7.4.10.0080.01115.72
7.4.00.0040.01115.32
7.3.330.0000.00613.23
7.3.320.0030.00313.31
7.3.310.0040.00416.34
7.3.300.0000.00716.34
7.3.290.0160.00316.24
7.3.280.0040.01316.28
7.3.270.0140.00317.40
7.3.260.0090.00916.27
7.3.250.0080.00916.34
7.3.240.0030.01516.49
7.3.230.0120.00616.51
7.3.210.0090.01216.29
7.3.200.0070.01419.39
7.3.190.0090.00916.32
7.3.180.0040.01116.40
7.3.170.0070.01016.45
7.3.160.0030.01316.21
7.3.130.0020.01615.57
7.3.120.0090.00815.22
7.3.110.0070.00915.15
7.3.100.0060.00915.17
7.3.90.0030.01115.21
7.3.80.0030.01215.38
7.3.70.0050.00615.21
7.3.60.0070.00715.35
7.3.50.0050.01015.23
7.3.40.0040.00615.23
7.3.30.0020.01015.29
7.3.20.0070.00717.09
7.3.10.0080.00517.07
7.3.00.0070.00416.85
7.2.330.0180.00316.58
7.2.320.0090.00916.73
7.2.310.0120.00616.65
7.2.300.0100.00716.52
7.2.290.0070.01016.55
7.2.260.0060.00915.90
7.2.250.0070.01015.38
7.2.240.0110.00615.48
7.2.230.0100.00915.48
7.2.220.0090.00615.51
7.2.210.0020.00915.59
7.2.200.0050.00815.50
7.2.190.0050.00815.46
7.2.180.0060.00815.32
7.2.170.0040.00915.32
7.2.160.0050.01215.65
7.2.150.0060.00817.58
7.2.140.0080.00817.43
7.2.130.0060.00817.21
7.2.120.0040.00617.40
7.2.110.0070.00617.20
7.2.100.0050.00517.39
7.2.90.0090.00617.42
7.2.80.0060.00817.18
7.2.70.0080.00717.28
7.2.60.0070.00817.29
7.2.50.0080.00517.31
7.2.40.0050.00817.44
7.2.30.0040.00717.42
7.2.20.0060.00717.36
7.2.10.0070.00917.34
7.2.00.0060.00917.85
7.1.330.0080.00616.27
7.1.320.0050.00616.22
7.1.310.0080.00716.23
7.1.300.0080.00616.33
7.1.290.0060.00716.30
7.1.280.0010.01316.27
7.1.270.0040.00716.18
7.1.260.0080.00716.17
7.1.250.0080.00716.25
7.1.240.0080.00816.61
7.1.230.0050.00816.57
7.1.220.0100.00216.52
7.1.210.0060.00616.47
7.1.200.0040.00616.62
7.1.190.0050.00716.61
7.1.180.0050.00716.49
7.1.170.0030.01116.57
7.1.160.0100.00516.57
7.1.150.0040.01216.62
7.1.140.0030.01016.53
7.1.130.0040.01016.57
7.1.120.0050.00916.64
7.1.110.0080.00816.52
7.1.100.0180.00616.79
7.1.90.0070.00616.50
7.1.80.0050.00916.45
7.1.70.0050.00716.79
7.1.60.0100.00517.59
7.1.50.0050.01016.52
7.1.40.0070.00516.48
7.1.30.0050.00816.37
7.1.20.0070.00516.59
7.1.10.0050.00916.51
7.1.00.0030.03818.41
7.0.330.0070.00416.20
7.0.320.0060.00516.26
7.0.310.0020.01216.37
7.0.300.0030.01316.33
7.0.290.0100.00416.34
7.0.280.0090.00516.23
7.0.270.0040.00816.11
7.0.260.0070.01016.15
7.0.250.0070.00716.12
7.0.240.0090.00716.38
7.0.230.0060.00716.34
7.0.220.0070.00716.29
7.0.210.0020.01216.19
7.0.200.0020.00916.38
7.0.190.0050.00816.13
7.0.180.0050.00716.10
7.0.170.0070.00716.06
7.0.160.0030.01116.29
7.0.150.0030.00816.18
7.0.140.0020.03118.14
7.0.130.0070.00816.15
7.0.120.0080.00616.16
7.0.110.0040.00916.33
7.0.100.0060.00716.22
7.0.90.0080.00416.30
7.0.80.0050.00916.21
7.0.70.0030.01116.39
7.0.60.0040.02617.53
7.0.50.0030.02116.78
7.0.40.0110.02016.12
7.0.30.0150.03116.25
7.0.20.0140.02216.28
7.0.10.0110.03016.11
7.0.00.0060.03316.15
5.6.400.0080.00514.80
5.6.390.0090.00414.85
5.6.380.0070.00615.09
5.6.370.0030.00915.15
5.6.360.0110.00615.09
5.6.350.0040.00915.14
5.6.340.0060.01115.05
5.6.330.0070.00914.99
5.6.320.0040.01114.95
5.6.310.0030.00915.10
5.6.300.0110.00215.29
5.6.290.0030.01114.84
5.6.280.0050.03017.04
5.6.270.0030.00815.28
5.6.260.0120.00314.84
5.6.250.0040.00815.13
5.6.240.0080.00615.07
5.6.230.0020.01215.28
5.6.220.0000.01414.98
5.6.210.0090.01416.84
5.6.200.0050.02016.04
5.6.190.0090.02516.85
5.6.180.1310.02216.75
5.6.170.0100.02116.94
5.6.160.0080.03416.85
5.6.150.0090.02816.16
5.6.140.0060.02116.04
5.6.130.0100.02916.11
5.6.120.0050.01917.08
5.6.110.0050.03117.04
5.6.100.0070.03617.15
5.6.90.0040.03316.98
5.6.80.0070.01816.77
5.6.70.0110.02516.66
5.6.60.0030.01215.11
5.6.50.0030.00814.81
5.6.40.0040.00714.91
5.6.30.0080.00514.70
5.6.20.0050.00714.94
5.6.10.0100.00515.11
5.6.00.0040.00614.90
5.5.380.0090.00714.74
5.5.370.0040.01215.02
5.5.360.0070.00714.62
5.5.350.0070.03216.70
5.5.340.0070.03715.91
5.5.330.0080.02116.74
5.5.320.0100.02216.77
5.5.310.0120.02816.81
5.5.300.0090.03016.07
5.5.290.0040.01915.92
5.5.280.0050.03217.01
5.5.270.0020.03516.92
5.5.260.0070.03016.84
5.5.250.0080.03116.83
5.5.240.0050.03316.68
5.5.230.0030.01014.88
5.5.220.0070.00714.94
5.5.210.0020.00914.88
5.5.200.0060.00714.68
5.5.190.0070.00514.84
5.5.180.0030.00914.67
5.5.170.0060.01014.83
5.5.160.0020.01014.69
5.5.150.0050.00714.94
5.5.140.0050.00814.83
5.5.130.0050.00514.93
5.5.120.0060.00914.83
5.5.110.0080.00514.83
5.5.100.0050.00914.80
5.5.90.0100.00214.92
5.5.80.0050.00814.87
5.5.70.0030.00814.86
5.5.60.0040.00714.91
5.5.50.0060.00514.85
5.5.40.0060.00714.88
5.5.30.0060.00814.74
5.5.20.0080.00914.91
5.5.10.0100.00514.73
5.5.00.0020.01114.72
5.4.450.0090.01814.36
5.4.440.0230.02514.39
5.4.430.0040.02114.32
5.4.420.0230.02214.28
5.4.410.0200.02014.31
5.4.400.0640.00214.06
5.4.390.0270.00314.04
5.4.380.0160.02613.89
5.4.370.0090.02214.00
5.4.360.0150.02014.08
5.4.350.0170.02014.09
5.4.340.0080.02014.00
5.4.330.0000.01111.69
5.4.320.0070.01611.91
5.4.310.0050.01912.06
5.4.300.0050.01811.93
5.4.290.0040.01812.04
5.4.280.0060.01911.93
5.4.270.0050.01711.94
5.4.260.0010.02414.18
5.4.250.0060.02114.10
5.4.240.0080.01814.12
5.4.230.0070.01914.14
5.4.220.0060.02313.96
5.4.210.0070.01914.15
5.4.200.0080.01814.11
5.4.190.0070.02114.11
5.4.180.0080.01914.01
5.4.170.0050.02214.12
5.4.160.0080.01814.21
5.4.150.0120.01914.14
5.4.140.0030.02313.37
5.4.130.0050.02513.35
5.4.120.0120.01613.33
5.4.110.0090.01813.38
5.4.100.0010.02313.22
5.4.90.0050.02113.30
5.4.80.0080.01813.28
5.4.70.0100.01913.29
5.4.60.0020.03113.31
5.4.50.0040.02313.33
5.4.40.0080.02213.34
5.4.30.0040.02213.30
5.4.20.0100.02413.24
5.4.10.0060.02513.40
5.4.00.0060.02413.09
5.3.290.0050.01712.22
5.3.280.0040.02212.76
5.3.270.0070.02312.74
5.3.260.0050.02312.83
5.3.250.0090.01912.83
5.3.240.0070.03012.83
5.3.230.0080.02712.80
5.3.220.0040.02212.81
5.3.210.0070.02512.83
5.3.200.0060.02112.76
5.3.190.0080.02012.82
5.3.180.0030.02512.79
5.3.170.0100.01712.88
5.3.160.0060.02912.87
5.3.150.0080.02212.80
5.3.140.0030.02112.76
5.3.130.0060.02912.87
5.3.120.0050.02312.79
5.3.110.0050.02112.80
5.3.100.0040.02412.72
5.3.90.0110.01812.69
5.3.80.0020.02712.64
5.3.70.0040.02012.60
5.3.60.0030.02212.71
5.3.50.0080.02012.57
5.3.40.0050.02212.58
5.3.30.0050.02212.64
5.3.20.0030.02212.49
5.3.10.0030.01912.47
5.3.00.0040.03012.50
5.2.170.0130.03311.14
5.2.160.0070.03711.23
5.2.150.0070.04011.22
5.2.140.0070.04011.09
5.2.130.0100.04011.07
5.2.120.0070.03711.18
5.2.110.0130.04010.92
5.2.100.0070.05311.00
5.2.90.0100.05011.18
5.2.80.0070.04011.30
5.2.70.0070.04711.16
5.2.60.0030.06311.01
5.2.50.0100.03711.11
5.2.40.0000.04711.07
5.2.30.0100.03711.05
5.2.20.0130.04011.12
5.2.10.0030.04011.03
5.2.00.0070.04010.88
5.1.60.0030.0339.99
5.1.50.0100.03010.00
5.1.40.0000.0379.90
5.1.30.0030.03710.16
5.1.20.0070.04010.35
5.1.10.0070.03310.11
5.1.00.0030.03710.14
5.0.50.0000.0438.61
5.0.40.0070.0278.62
5.0.30.0000.0538.30
5.0.20.0030.0278.18
5.0.10.0030.0308.25
5.0.00.0000.0438.16
4.4.90.0000.0276.96
4.4.80.0030.0236.96
4.4.70.0000.0336.96
4.4.60.0030.0206.96
4.4.50.0000.0276.96
4.4.40.0030.0306.96
4.4.30.0030.0276.96
4.4.20.0000.0236.96
4.4.10.0030.0336.96
4.4.00.0030.0336.96
4.3.110.0030.0236.96
4.3.100.0070.0206.96
4.3.90.0000.0236.96
4.3.80.0030.0376.96
4.3.70.0030.0206.96
4.3.60.0030.0276.96
4.3.50.0030.0206.96
4.3.40.0000.0376.96
4.3.30.0030.0276.96
4.3.20.0030.0206.96
4.3.10.0000.0236.96
4.3.00.0100.0239.29

preferences:
46.88 ms | 400 KiB | 5 Q