3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getUTF8CharCode($c) { $h = ord($c{0}); if ($h <= 0x7F) { return $h; } else if ($h < 0xC2) { return false; } else if ($h <= 0xDF) { return ($h & 0x1F) << 6 | (ord($c{1}) & 0x3F); } else if ($h <= 0xEF) { return ($h & 0x0F) << 12 | (ord($c{1}) & 0x3F) << 6 | (ord($c{2}) & 0x3F); } else if ($h <= 0xF4) { return ($h & 0x0F) << 18 | (ord($c{1}) & 0x3F) << 12 | (ord($c{2}) & 0x3F) << 6 | (ord($c{3}) & 0x3F); } else { return false; } } function escapeCSSCharacter($c) { return "\\" . base_convert(getUTF8CharCode($c), 10, 16) . " "; } function escapeCSSRule($data, array $immuneChars = array()) { $result = ""; for ($i = 0; $i < mb_strlen($data); $i++) { $currChar = mb_substr($data, $i, 1); if (getUTF8CharCode($currChar) > 256 && !preg_match("/^\w$/", $currChar) && !in_array($currChar, $immuneChars)) { $result .= escapeCSSCharacter($currChar); } else { $result .= $currChar; } } return $result; } echo escapeCSSRule("#BADA55");

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.0030.01016.49
8.3.50.0100.00821.95
8.3.40.0130.00318.59
8.3.30.0130.00918.96
8.3.20.0070.00020.16
8.3.10.0080.00023.60
8.3.00.0000.00819.02
8.2.180.0120.00616.50
8.2.170.0110.00422.96
8.2.160.0030.01020.36
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00420.84
8.2.110.0070.00322.08
8.2.100.0090.00317.59
8.2.90.0040.00419.10
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00417.68
8.2.50.0060.00318.07
8.2.40.0030.00621.19
8.2.30.0030.00518.05
8.2.20.0040.00417.50
8.2.10.0050.00217.87
8.2.00.0040.00417.61
8.1.280.0110.00725.92
8.1.270.0030.00523.96
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.03
8.1.230.0060.00618.83
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0100.00017.00
8.1.190.0030.00516.88
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0040.00421.94
8.1.150.0040.00418.37
8.1.140.0000.00717.31
8.1.130.0030.00317.75
8.1.120.0030.00317.23
8.1.110.0000.00717.30
8.1.100.0040.00417.31
8.1.90.0000.00717.34
8.1.80.0040.00417.23
8.1.70.0040.00417.18
8.1.60.0000.00917.29
8.1.50.0040.00417.40
8.1.40.0040.00417.29
8.1.30.0040.00417.54
8.1.20.0030.00617.59
8.1.10.0030.00717.40
8.1.00.0040.00417.23
8.0.300.0070.00018.77
8.0.290.0040.00416.91
8.0.280.0030.00318.37
8.0.270.0000.00717.04
8.0.260.0000.00617.21
8.0.250.0000.00716.91
8.0.240.0070.00016.80
8.0.230.0000.00716.84
8.0.220.0040.00416.79
8.0.210.0040.00416.81
8.0.200.0000.00716.92
8.0.190.0040.00416.95
8.0.180.0040.00416.82
8.0.170.0040.00416.90
8.0.160.0050.00316.84
8.0.150.0000.00716.74
8.0.140.0000.00716.79
8.0.130.0060.00013.24
8.0.120.0000.00816.74
8.0.110.0080.00016.70
8.0.100.0070.00016.88
8.0.90.0040.00416.68
8.0.80.0150.00016.77
8.0.70.0000.00816.69
8.0.60.0000.00716.73
8.0.50.0000.00816.64
8.0.30.0130.00817.00
8.0.20.0110.00917.40
8.0.10.0070.00016.79
8.0.00.0120.00716.61
7.4.330.0000.00515.00
7.4.320.0070.00016.55
7.4.300.0040.00416.62
7.4.290.0050.00516.55
7.4.280.0040.00416.67
7.4.270.0070.00416.64
7.4.260.0030.00416.65
7.4.250.0030.00516.43
7.4.240.0050.00216.60
7.4.230.0030.00316.72
7.4.220.0070.01416.59
7.4.210.0130.00316.70
7.4.200.0070.00016.55
7.4.190.0000.00716.64
7.4.160.0130.00716.46
7.4.150.0110.00717.40
7.4.140.0120.00517.86
7.4.130.0070.01016.62
7.4.120.0110.00616.67
7.4.110.0130.00316.68
7.4.100.0130.00516.48
7.4.90.0150.00316.54
7.4.80.0130.00419.39
7.4.70.0040.01516.68
7.4.60.0120.00816.60
7.4.50.0030.00316.52
7.4.40.0100.00716.47
7.4.30.0180.00416.63
7.4.00.0070.00915.00
7.3.330.0000.00613.15
7.3.320.0000.00613.42
7.3.310.0040.00416.31
7.3.300.0040.00416.43
7.3.290.0060.00916.43
7.3.280.0100.00716.43
7.3.270.0070.01017.40
7.3.260.0120.01316.67
7.3.250.0110.00916.53
7.3.240.0070.01016.66
7.3.230.0110.01216.43
7.3.210.0030.01716.66
7.3.200.0030.01719.39
7.3.190.0060.01016.64
7.3.180.0110.00416.40
7.3.170.0060.00916.50
7.3.160.0090.00616.68
7.3.120.0050.01115.05
7.3.110.0060.00614.71
7.3.100.0070.00714.81
7.3.90.0060.00915.21
7.3.80.0030.00914.52
7.3.70.0060.00614.96
7.3.60.0070.00714.77
7.3.50.0030.01314.96
7.3.40.0090.00014.82
7.3.30.0030.01314.87
7.3.20.0060.00616.79
7.3.10.0070.00716.64
7.3.00.0100.00016.74
7.2.330.0120.01016.70
7.2.320.0100.00716.69
7.2.310.0060.01216.73
7.2.300.0130.00316.59
7.2.290.0090.01316.76
7.2.250.0070.01115.35
7.2.240.0100.01014.96
7.2.230.0040.00715.40
7.2.220.0090.00615.05
7.2.210.0030.01314.80
7.2.200.0060.00915.13
7.2.190.0030.01015.10
7.2.180.0070.00715.06
7.2.170.0050.00515.27
7.2.00.0090.00019.59
7.1.330.0030.01115.77
7.1.320.0040.01115.75
7.1.310.0070.00715.51
7.1.300.0100.00315.53
7.1.290.0070.00315.84
7.1.280.0030.00915.89
7.1.270.0080.00815.65
7.1.260.0070.00715.93
7.1.100.0030.01018.22
7.1.70.0070.00717.15
7.1.60.0110.01419.46
7.1.50.0090.01217.08
7.1.00.0030.07722.40
7.0.200.0140.00016.52
7.0.140.0000.07321.92
7.0.60.0100.07719.97
7.0.50.0070.08317.75
7.0.40.0000.05320.05
7.0.30.0470.07720.09
7.0.20.0130.04020.08
7.0.10.0370.07020.16
7.0.00.0070.04320.25
5.6.280.0070.07021.03
5.6.210.0000.09320.77
5.6.200.0130.03318.25
5.6.190.0070.05320.48
5.6.180.3430.03320.42
5.6.170.0330.06720.51
5.6.160.0000.04720.61
5.6.150.0100.07718.30
5.6.140.0130.06718.23
5.6.130.0070.05318.18
5.6.120.0030.08321.15
5.6.110.0070.07721.00
5.6.100.0130.07321.16
5.6.90.0070.04321.02
5.6.80.0100.07020.54
5.6.70.0170.05320.42
5.5.350.0070.03720.44
5.5.340.0030.07318.06
5.5.330.0170.07720.21
5.5.320.0230.08320.28
5.5.310.0170.04320.34
5.5.300.0100.08017.93
5.5.290.0070.08317.93
5.5.280.0070.08320.89
5.5.270.0070.04020.88
5.5.260.0200.06720.89
5.5.250.0070.08720.60
5.5.240.0030.03720.10
5.4.450.0670.06019.59
5.4.440.0430.05719.54
5.4.430.0070.05719.61
5.4.420.0700.00019.32
5.4.410.0170.06719.01
5.4.400.0200.05718.75
5.4.390.0300.05018.75
5.4.380.0130.06318.60
5.4.370.0100.04318.54
5.4.360.0000.06018.77
5.4.350.0090.04512.03
5.4.340.0090.03312.03
5.4.320.0110.03912.52
5.4.310.0070.04412.51
5.4.300.0040.04312.52
5.4.290.0090.03712.51
5.4.280.0120.03412.41
5.4.270.0050.03912.41
5.4.260.0040.04112.41
5.4.250.0050.04112.41
5.4.240.0050.03812.41
5.4.230.0090.03612.40
5.4.220.0110.03212.40
5.4.210.0080.03412.41
5.4.200.0050.03912.40
5.4.190.0110.03512.40
5.4.180.0070.03812.40
5.4.170.0070.03912.40
5.4.160.0080.03712.40
5.4.150.0070.04012.40
5.4.140.0050.04312.09
5.4.130.0050.03912.07
5.4.120.0070.03712.02
5.4.110.0050.03912.02
5.4.100.0060.04412.02
5.4.90.0030.04012.03
5.4.80.0040.03912.02
5.4.70.0050.03612.02
5.4.60.0040.03712.02
5.4.50.0070.03412.02
5.4.40.0070.03612.01
5.4.30.0050.03812.00
5.4.20.0080.03512.00
5.4.10.0090.03912.01
5.4.00.0080.04111.49
5.3.290.0090.04512.80
5.3.280.0060.04112.71
5.3.270.0020.04612.73
5.3.260.0080.03812.72
5.3.250.0050.04112.72
5.3.240.0060.04012.72
5.3.230.0080.03912.71
5.3.220.0100.03912.68
5.3.210.0110.04812.68
5.3.200.0080.04812.68
5.3.190.0100.04512.68
5.3.180.0080.04412.67
5.3.170.0050.04212.67
5.3.160.0040.04512.67
5.3.150.0050.04512.67
5.3.140.0120.03512.66
5.3.130.0070.04312.66
5.3.120.0110.03912.65
5.3.110.0100.04312.66
5.3.100.0080.03712.14
5.3.90.0100.03712.12
5.3.80.0060.04312.11
5.3.70.0060.04412.11
5.3.60.0120.05612.10
5.3.50.0090.07612.04
5.3.40.0080.05312.04
5.3.30.0130.07912.00
5.3.20.0070.04711.79
5.3.10.0100.07211.75
5.3.00.0090.05511.74
5.2.170.0060.0459.24
5.2.160.0050.0409.24
5.2.150.0070.0679.24
5.2.140.0060.0389.24
5.2.130.0100.0369.20
5.2.120.0080.0389.20
5.2.110.0080.0319.20
5.2.100.0050.0329.19
5.2.90.0110.0329.19
5.2.80.0060.0419.19
5.2.70.0050.0399.19
5.2.60.0100.0419.16
5.2.50.0110.0569.12
5.2.40.0090.0339.10
5.2.30.0060.0509.06
5.2.20.0070.0469.05
5.2.10.0120.0418.96
5.2.00.0080.0488.82
5.1.60.0080.0308.11
5.1.50.0080.0348.11
5.1.40.0040.0358.09
5.1.30.0070.0348.43
5.1.20.0080.0338.45
5.1.10.0060.0338.19
5.1.00.0030.0378.19
5.0.50.0060.0206.66
5.0.40.0060.0216.53
5.0.30.0050.0336.33
5.0.20.0070.0236.30
5.0.10.0040.0276.29
5.0.00.0070.0606.28
4.4.90.0070.0294.78
4.4.80.0020.0194.76
4.4.70.0050.0174.76
4.4.60.0030.0194.76
4.4.50.0050.0194.77
4.4.40.0030.0314.71
4.4.30.0050.0214.76
4.4.20.0060.0184.84
4.4.10.0040.0184.85
4.4.00.0030.0264.76
4.3.110.0010.0214.67
4.3.100.0020.0234.66
4.3.90.0000.0174.63
4.3.80.0020.0254.58
4.3.70.0020.0154.63
4.3.60.0020.0154.62
4.3.50.0030.0164.63
4.3.40.0020.0254.54
4.3.30.0010.0173.32
4.3.20.0040.0193.30
4.3.10.0030.0243.27
4.3.00.0170.0237.60

preferences:
42.79 ms | 401 KiB | 5 Q