3v4l.org

run code in 300+ PHP versions simultaneously
<?php function HSL2RGB($h, $s, $l) { $s = max(0, min($s, 100)); $l = max(0, min($l, 100)); $s = $s/100; $l = $l/100; $h = $h >= 360 ? $h % 360 : $h; $c = ( 1 - abs( 2 * $l - 1 ) ) * $s; $x = $c * ( 1 - abs( fmod( ( $h / 60 ), 2 ) - 1 ) ); $m = $l - ( $c / 2 ); if ( $h < 60 ) { $r = $c; $g = $x; $b = 0; } else if ( $h < 120 ) { $r = $x; $g = $c; $b = 0; } else if ( $h < 180 ) { $r = 0; $g = $c; $b = $x; } else if ( $h < 240 ) { $r = 0; $g = $x; $b = $c; } else if ( $h < 300 ) { $r = $x; $g = 0; $b = $c; } else { $r = $c; $g = 0; $b = $x; } $r = ( $r + $m ) * 255; $g = ( $g + $m ) * 255; $b = ( $b + $m ) * 255; return [$r, $g, $b]; } print_r(HSL2RGB(55, 99, 100));

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.0110.01118.43
8.3.50.0280.01121.11
8.3.40.0140.00018.97
8.3.30.0070.00719.21
8.3.20.0000.00720.32
8.3.10.0040.00423.64
8.3.00.0080.00019.38
8.2.180.0070.01418.66
8.2.170.0040.01122.96
8.2.160.0140.00020.35
8.2.150.0070.01024.18
8.2.140.0000.00824.66
8.2.130.0030.01426.16
8.2.120.0070.00321.01
8.2.110.0030.00622.25
8.2.100.0080.00417.75
8.2.90.0040.00419.30
8.2.80.0000.00917.97
8.2.70.0080.00017.63
8.2.60.0050.00318.16
8.2.50.0000.01018.07
8.2.40.0000.00820.07
8.2.30.0080.00018.15
8.2.20.0040.00417.65
8.2.10.0040.00418.20
8.2.00.0000.00717.88
8.1.280.0080.00625.92
8.1.270.0040.01122.18
8.1.260.0000.00826.35
8.1.250.0080.00628.09
8.1.240.0080.00023.92
8.1.230.0040.00719.16
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0000.00918.78
8.1.160.0040.00422.07
8.1.150.0070.00019.01
8.1.140.0070.00017.53
8.1.130.0070.00017.96
8.1.120.0030.00517.59
8.1.110.0070.00017.58
8.1.100.0070.00017.58
8.1.90.0040.00417.43
8.1.80.0040.00417.50
8.1.70.0070.00017.43
8.1.60.0090.00017.56
8.1.50.0040.00417.61
8.1.40.0000.00717.63
8.1.30.0090.00017.65
8.1.20.0040.00417.70
8.1.10.0000.00717.57
8.1.00.0060.00317.39
8.0.300.0080.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00718.59
8.0.270.0040.00417.40
8.0.260.0000.00617.34
8.0.250.0000.00717.04
8.0.240.0000.00717.03
8.0.230.0040.00416.93
8.0.220.0030.00316.98
8.0.210.0070.00016.99
8.0.200.0030.00316.98
8.0.190.0050.00317.05
8.0.180.0030.00717.00
8.0.170.0040.00416.91
8.0.160.0070.00017.07
8.0.150.0000.00716.92
8.0.140.0030.00316.85
8.0.130.0060.00013.43
8.0.120.0040.00416.90
8.0.110.0050.00216.91
8.0.100.0000.00716.76
8.0.90.0030.00516.84
8.0.80.0040.01516.96
8.0.70.0070.00017.02
8.0.60.0040.00417.10
8.0.50.0040.00416.83
8.0.30.0150.00617.24
8.0.20.0120.01117.40
8.0.10.0040.00417.02
8.0.00.0110.00817.03
7.4.330.0000.00515.02
7.4.320.0000.00616.58
7.4.300.0000.00716.71
7.4.290.0030.00316.45
7.4.280.0070.00016.71
7.4.270.0050.00316.70
7.4.260.0070.00016.65
7.4.250.0000.00716.54
7.4.240.0030.00416.64
7.4.230.0030.00316.79
7.4.220.0070.01016.75
7.4.210.0060.00816.76
7.4.200.0000.00716.70
7.4.160.0110.00616.59
7.4.150.0170.00617.40
7.4.140.0100.01217.86
7.4.130.0200.00216.57
7.4.120.0060.01116.63
7.4.110.0100.01016.70
7.4.100.0110.00616.66
7.4.90.0070.01116.57
7.4.80.0060.01519.39
7.4.70.0110.00416.45
7.4.60.0030.01316.59
7.4.50.0040.00416.61
7.4.40.0100.00716.55
7.4.30.0040.01416.55
7.4.00.0110.00715.01
7.3.330.0030.00313.45
7.3.320.0030.00313.23
7.3.310.0000.00716.40
7.3.300.0070.00016.39
7.3.290.0030.01116.44
7.3.280.0070.00916.44
7.3.270.0130.01017.40
7.3.260.0070.01016.48
7.3.250.0100.00816.69
7.3.240.0130.00316.48
7.3.230.0100.01016.44
7.3.210.0030.01316.37
7.3.200.0130.00319.39
7.3.190.0080.00816.54
7.3.180.0090.00616.54
7.3.170.0160.00016.64
7.3.160.0100.00616.59
7.2.330.0110.00716.83
7.2.320.0180.00016.55
7.2.310.0140.01016.78
7.2.300.0080.00816.47
7.2.290.0180.00616.53
7.2.60.0000.01316.95
7.2.50.0090.00317.04
7.2.00.0090.00919.50
7.1.200.0070.00715.95
7.1.100.0060.00618.43
7.1.70.0030.00617.40
7.1.60.0110.01419.32
7.1.50.0060.01616.77
7.1.00.0030.07722.46
7.0.200.0030.00616.84
7.0.140.0000.07022.23
7.0.60.0070.03720.05
7.0.50.0000.04318.05
7.0.40.0100.07320.13
7.0.30.0300.06720.29
7.0.20.0200.08320.14
7.0.10.0100.08720.09
7.0.00.0000.04320.21
5.6.280.0000.07321.20
5.6.210.0100.07720.77
5.6.200.0030.08318.34
5.6.190.0100.04320.67
5.6.180.4030.03720.54
5.6.170.0370.07720.84
5.6.160.0070.03720.66
5.6.150.0100.06718.41
5.6.140.0070.07718.26
5.6.130.0000.04718.32
5.6.120.0070.04021.13
5.6.110.0070.04321.07
5.6.100.0070.08721.20
5.6.90.0070.08021.09
5.6.80.0100.03020.56
5.6.70.4300.03720.69
5.5.350.0030.08320.64
5.5.340.0070.07318.12
5.5.330.0100.08020.43
5.5.320.0230.03320.48
5.5.310.0270.04720.45
5.5.300.0100.06318.20
5.5.290.0000.04318.20
5.5.280.0100.07720.87
5.5.270.0100.05720.86
5.5.260.0070.04320.96
5.5.250.0100.07720.75
5.5.240.0330.06720.24
5.4.450.0870.05719.31
5.4.440.0800.08019.64
5.4.430.0770.06019.79
5.4.420.0170.05719.76
5.4.410.1000.05719.46
5.4.400.0900.05319.15
5.4.390.1000.04719.14
5.4.380.0800.05719.15
5.4.370.0730.06719.13
5.4.360.0870.04719.32
5.4.350.1230.06019.35
5.4.340.0040.03612.03
5.4.320.0050.03712.52
5.4.310.0050.03912.51
5.4.300.0080.03412.52
5.4.290.0060.03812.51
5.4.280.0080.03312.41
5.4.270.0070.03412.41
5.4.260.0040.03912.41
5.4.250.0050.03812.41
5.4.240.0070.03512.41
5.4.230.0100.03312.40
5.4.220.0060.03612.40
5.4.210.0070.03512.40
5.4.200.0060.03812.39
5.4.190.0020.04012.40
5.4.180.0080.03812.39
5.4.170.0070.03512.40
5.4.160.0050.03712.39
5.4.150.0040.03912.39
5.4.140.0050.04012.08
5.4.130.0060.05012.07
5.4.120.0040.03712.02
5.4.110.0070.04012.02
5.4.100.0060.03712.02
5.4.90.0100.03312.02
5.4.80.0080.03712.02
5.4.70.0070.03512.02
5.4.60.0070.04112.02
5.4.50.0110.03512.02
5.4.40.0060.03512.00
5.4.30.0050.03612.00
5.4.20.0120.03012.00
5.4.10.0040.04112.00
5.4.00.0060.03611.49
5.3.290.0030.04212.80
5.3.280.0090.03512.71
5.3.270.0090.03612.73
5.3.260.0090.03612.72
5.3.250.0080.03512.72
5.3.240.0120.03912.72
5.3.230.0160.05112.71
5.3.220.0100.04512.68
5.3.210.0070.04012.68
5.3.200.0070.03812.68
5.3.190.0030.04112.68
5.3.180.0090.03612.67
5.3.170.0080.03912.67
5.3.160.0050.04012.67
5.3.150.0110.03512.68
5.3.140.0080.03512.66
5.3.130.0060.03812.66
5.3.120.0080.03712.66
5.3.110.0050.04512.66
5.3.100.0060.03812.14
5.3.90.0060.03712.12
5.3.80.0080.03412.11
5.3.70.0070.03512.11
5.3.60.0100.03612.09
5.3.50.0070.03612.04
5.3.40.0040.03912.04
5.3.30.0090.03212.00
5.3.20.0070.03811.78
5.3.10.0040.04611.74
5.3.00.0060.04911.73
5.2.170.0050.0309.23
5.2.160.0070.0279.23
5.2.150.0070.0289.23
5.2.140.0070.0289.23
5.2.130.0060.0289.19
5.2.120.0050.0289.19
5.2.110.0050.0299.20
5.2.100.0040.0309.19
5.2.90.0030.0319.20
5.2.80.0080.0279.19
5.2.70.0060.0299.19
5.2.60.0040.0309.14
5.2.50.0070.0279.11
5.2.40.0070.0269.09
5.2.30.0050.0299.06
5.2.20.0040.0309.05
5.2.10.0040.0298.96
5.2.00.0060.0278.82
5.1.60.0040.0248.11
5.1.50.0030.0258.10
5.1.40.0050.0238.08
5.1.30.0030.0278.43
5.1.20.0050.0268.45
5.1.10.0050.0258.18
5.1.00.0020.0288.18
5.0.50.0040.0196.66
5.0.40.0030.0196.53
5.0.30.0060.0296.33
5.0.20.0030.0196.30
5.0.10.0030.0206.29
5.0.00.0040.0306.28
4.4.90.0030.0144.78
4.4.80.0010.0174.76
4.4.70.0040.0144.75
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0020.0264.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0030.0154.85
4.4.00.0010.0264.76
4.3.110.0020.0164.67
4.3.100.0060.0114.66
4.3.90.0010.0164.64
4.3.80.0020.0254.59
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0040.0194.63
4.3.40.0020.0334.54
4.3.30.0050.0183.32
4.3.20.0020.0163.30
4.3.10.0010.0163.27
4.3.00.0230.0177.11

preferences:
46.82 ms | 401 KiB | 5 Q