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;}*{display:none;}/*", array("#"));

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.70.0070.00716.75
8.3.60.0090.00616.49
8.3.50.0130.00821.93
8.3.40.0040.01118.84
8.3.30.0070.00718.98
8.3.20.0040.00420.16
8.3.10.0080.00023.73
8.3.00.0050.00320.97
8.2.180.0120.00916.38
8.2.170.0040.01122.96
8.2.160.0100.00320.45
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00320.83
8.2.110.0090.00022.25
8.2.100.0060.00617.72
8.2.90.0030.00518.78
8.2.80.0040.00417.97
8.2.70.0040.00417.38
8.2.60.0040.00417.68
8.2.50.0000.00918.07
8.2.40.0040.00421.19
8.2.30.0080.00018.12
8.2.20.0080.00017.61
8.2.10.0000.00717.82
8.2.00.0000.00817.43
8.1.280.0170.00325.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0000.00922.18
8.1.230.0040.00719.09
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0060.00317.11
8.1.190.0080.00016.86
8.1.180.0040.00418.10
8.1.170.0080.00018.47
8.1.160.0040.00421.85
8.1.150.0050.00318.42
8.1.140.0040.00417.35
8.1.130.0030.00317.81
8.1.120.0040.00417.32
8.1.110.0030.00517.20
8.1.100.0020.00517.26
8.1.90.0050.00317.20
8.1.80.0030.00517.23
8.1.70.0000.00717.30
8.1.60.0080.00017.46
8.1.50.0030.00517.30
8.1.40.0040.00417.42
8.1.30.0060.00317.51
8.1.20.0000.00717.43
8.1.10.0030.00717.40
8.1.00.0080.00017.29
8.0.300.0070.00018.77
8.0.290.0000.00717.05
8.0.280.0030.00318.26
8.0.270.0050.00217.05
8.0.260.0060.00017.12
8.0.250.0060.00016.93
8.0.240.0000.00716.78
8.0.230.0080.00016.85
8.0.220.0040.00416.75
8.0.210.0000.00716.78
8.0.200.0030.00316.89
8.0.190.0000.00716.81
8.0.180.0040.00416.86
8.0.170.0000.00716.80
8.0.160.0030.00316.70
8.0.150.0070.00016.67
8.0.140.0040.00416.68
8.0.130.0030.00313.34
8.0.120.0040.00416.74
8.0.110.0050.00316.83
8.0.100.0040.00416.63
8.0.90.0040.00416.80
8.0.80.0030.01016.87
8.0.70.0050.00316.68
8.0.60.0040.00416.80
8.0.50.0040.00416.76
8.0.30.0130.00516.78
8.0.20.0110.00717.40
8.0.10.0070.00016.88
8.0.00.0070.01016.62
7.4.330.0060.00015.11
7.4.320.0000.00616.72
7.4.300.0060.00016.73
7.4.290.0030.00616.84
7.4.280.0000.00816.73
7.4.270.0030.00616.69
7.4.260.0040.00416.74
7.4.250.0070.00016.63
7.4.240.0040.00416.77
7.4.230.0030.00316.84
7.4.220.0000.01816.76
7.4.210.0120.00316.87
7.4.200.0000.00816.66
7.4.190.0000.00716.95
7.4.160.0040.01317.01
7.4.150.0110.00717.40
7.4.140.0120.01017.86
7.4.130.0140.00316.94
7.4.120.0160.00716.68
7.4.110.0130.01016.90
7.4.100.0100.01016.80
7.4.90.0110.00716.77
7.4.80.0130.01319.39
7.4.70.0140.00416.59
7.4.60.0030.02116.94
7.4.50.0030.00316.58
7.4.40.0070.01016.69
7.4.30.0120.00416.72
7.4.00.0070.01015.27
7.3.330.0000.00513.50
7.3.320.0050.00013.39
7.3.310.0040.00416.54
7.3.300.0000.00716.59
7.3.290.0120.00316.63
7.3.280.0100.00616.57
7.3.270.0100.00717.40
7.3.260.0220.00316.84
7.3.250.0100.00916.92
7.3.240.0090.00816.58
7.3.230.0040.01416.82
7.3.210.0050.01416.73
7.3.200.0120.00619.39
7.3.190.0180.00416.82
7.3.180.0030.01316.93
7.3.170.0110.00616.89
7.3.160.0110.00716.82
7.3.120.0080.00615.16
7.3.110.0110.00515.25
7.3.100.0040.01315.04
7.3.90.0090.00615.07
7.3.80.0030.01015.01
7.3.70.0040.00915.06
7.3.60.0050.00915.11
7.3.50.0060.00614.93
7.3.40.0040.00915.00
7.3.30.0030.01215.15
7.3.20.0050.01116.92
7.3.10.0070.00616.81
7.3.00.0020.01116.74
7.2.330.0090.00916.89
7.2.320.0080.01116.91
7.2.310.0050.01616.73
7.2.300.0090.00916.87
7.2.290.0120.00616.77
7.2.250.0050.01415.18
7.2.240.0110.01015.27
7.2.230.0100.00815.45
7.2.220.0080.00615.29
7.2.210.0080.00615.42
7.2.200.0020.01215.17
7.2.190.0050.00915.30
7.2.180.0080.00315.27
7.2.170.0020.01415.32
7.2.60.0090.00616.93
7.2.00.0060.00619.86
7.1.330.0130.00216.10
7.1.320.0020.01116.02
7.1.310.0050.00816.12
7.1.300.0050.00516.10
7.1.290.0040.00916.05
7.1.280.0020.01416.14
7.1.270.0030.01015.90
7.1.260.0020.01016.17
7.1.200.0080.00415.84
7.1.100.0000.01718.44
7.1.70.0050.00317.30
7.1.60.0070.01719.46
7.1.50.0070.01017.28
7.1.00.0030.07722.38
7.0.200.0030.00717.00
7.0.140.0070.07022.17
7.0.60.0170.06719.91
7.0.50.0070.03717.91
7.0.40.0170.07720.13
7.0.30.0300.04320.35
7.0.20.0230.03320.28
7.0.10.0030.09020.26
7.0.00.0130.08320.20
5.6.280.0100.06320.80
5.6.210.0100.08020.49
5.6.200.0030.08718.18
5.6.190.0100.04320.51
5.6.180.0030.06020.65
5.6.170.0270.03720.45
5.6.160.0100.08320.45
5.6.150.0100.06718.22
5.6.140.0130.04018.27
5.6.130.0100.05718.28
5.6.120.0030.04321.01
5.6.110.0070.05720.99
5.6.100.0100.07721.13
5.6.90.0100.05021.12
5.6.80.0000.06020.38
5.5.350.0000.06020.45
5.5.340.0070.08317.96
5.5.330.0030.06020.31
5.5.320.0370.07320.36
5.5.310.0400.07020.38
5.5.300.0000.06017.96
5.5.290.0070.03717.98
5.5.280.0100.06020.89
5.5.270.0070.08020.88
5.5.260.0030.08720.89
5.5.250.0170.05720.70
5.5.240.0070.02720.25
5.4.450.0300.04719.48
5.4.440.0670.05719.30
5.4.430.0700.06019.44
5.4.420.0770.05019.30
5.4.410.0200.06019.08
5.4.400.1000.05719.26
5.4.390.0970.05719.00
5.4.380.0530.06718.49
5.4.370.0330.07018.75
5.4.360.0430.07318.74
5.4.350.0330.05718.79
5.4.340.0370.04318.77
5.4.320.0040.04512.52
5.4.310.0060.03912.51
5.4.300.0330.08812.52
5.4.290.0170.07112.51
5.4.280.0100.05812.41
5.4.270.0090.05012.41
5.4.260.0100.05512.41
5.4.250.0080.06112.41
5.4.240.0100.05612.41
5.4.230.0080.05812.40
5.4.220.0100.05612.40
5.4.210.0110.05112.40
5.4.200.0120.05912.41
5.4.190.0170.05812.39
5.4.180.0200.08812.39
5.4.170.0170.05712.41
5.4.160.0130.05812.40
5.4.150.0130.05312.40
5.4.140.0120.05712.09
5.4.130.0240.06012.07
5.4.120.0100.06012.02
5.4.110.0140.05412.02
5.4.100.0100.05812.02
5.4.90.0140.06812.03
5.4.80.0150.10012.02
5.4.70.0090.05212.02
5.4.60.0130.04712.02
5.4.50.0090.04912.02
5.4.40.0100.04712.01
5.4.30.0110.05312.01
5.4.20.0130.07812.00
5.4.10.0140.04912.01
5.4.00.0140.06211.50
5.3.290.0060.04012.80
5.3.280.0140.04712.71
5.3.270.0150.06112.73
5.3.260.0110.05612.71
5.3.250.0110.04912.72
5.3.240.0110.05312.71
5.3.230.0070.05112.71
5.3.220.0070.05212.68
5.3.210.0170.08112.68
5.3.200.0100.04812.68
5.3.190.0100.04712.68
5.3.180.0080.06312.68
5.3.170.0110.09912.67
5.3.160.0050.07612.67
5.3.150.0160.05612.67
5.3.140.0160.09512.66
5.3.130.0280.10912.66
5.3.120.0230.11412.65
5.3.110.0120.05312.66
5.3.100.0310.10312.14
5.3.90.0270.10112.12
5.3.80.0130.05212.11
5.3.70.0130.04612.11
5.3.60.0070.05512.10
5.3.50.0080.05112.04
5.3.40.0090.05512.05
5.3.30.0180.07312.00
5.3.20.0070.05311.78
5.3.10.0070.04911.75
5.3.00.0070.04111.73
5.2.170.0040.0429.24
5.2.160.0080.0379.24
5.2.150.0080.0389.24
5.2.140.0110.0369.24
5.2.130.0070.0409.20
5.2.120.0060.0409.20
5.2.110.0070.0389.20
5.2.100.0060.0419.19
5.2.90.0080.0399.20
5.2.80.0070.0409.19
5.2.70.0120.0349.19
5.2.60.0070.0389.16
5.2.50.0130.0619.12
5.2.40.0140.0519.11
5.2.30.0190.0739.07
5.2.20.0150.0539.06
5.2.10.0040.0508.96
5.2.00.0080.0398.82
5.1.60.0070.0358.12
5.1.50.0080.0368.11
5.1.40.0070.0378.08
5.1.30.0050.0408.43
5.1.20.0080.0378.45
5.1.10.0100.0268.19
5.1.00.0060.0348.18
5.0.50.0030.0266.66
5.0.40.0030.0236.53
5.0.30.0080.0386.34
5.0.20.0040.0276.30
5.0.10.0060.0256.29
5.0.00.0080.0396.28
4.4.90.0040.0254.78
4.4.80.0070.0204.75
4.4.70.0030.0224.76
4.4.60.0050.0204.75
4.4.50.0020.0234.77
4.4.40.0040.0344.71
4.4.30.0040.0214.76
4.4.20.0060.0204.85
4.4.10.0050.0214.85
4.4.00.0070.0324.76
4.3.110.0040.0224.66
4.3.100.0040.0264.67
4.3.90.0050.0224.63
4.3.80.0060.0324.58
4.3.70.0020.0314.63
4.3.60.0040.0224.63
4.3.50.0050.0244.63
4.3.40.0060.0344.54
4.3.30.0030.0203.32
4.3.20.0040.0183.30
4.3.10.0030.0193.27
4.3.00.0070.0207.07

preferences:
59.69 ms | 401 KiB | 5 Q