3v4l.org

run code in 300+ PHP versions simultaneously
<?php $css=<<<CSS p.special { font: 12pt/14pt sans-serif; margin: 5px 0px 2px 25px; border: medium dashed #ff0000; background: white url( http://www.foo.com/image.gif ) repeat-x fixed top right; } /************************************************* Save with a name ending in .css such as styles.css *************************************************/ h1 { color: red; padding: 10px; text-decoration: underline; } .code_sample ul { list-style-type: upper-roman; /* LEAVE THIS BIT OUT */ margin-left: 50px; } .code_sample p { color: darkblue } a:link, a:visited, a:hover, a:active { background-color: green; color: white; padding: 10px 25px; text-align: center; text-decoration: none; display: inline-block; } CSS; $patterns=[ '~\s+~', // reduce one or more consecutive whitespace characters ([\n\r \t]+) to a single space ...this combines the 2nd, 3rd, and 4th pattern from catchamonkey's answer '~/\s*\*.*?\*/\s*|(?:(?<=[,:;{}(]) | (?=[,:;{})]))|;(?=})|^ | $~s' // comment blocks, leading/trailing spaces after ,:;{} characters, space before ), space after (, semicolon followed by }, whitespace at start/end of file ]; $replacements=[ ' ', '' ]; // And here's a rabbit hole: https://regex101.com/r/nZbHND/1 var_export(preg_replace($patterns,$replacements,$css));

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.0140.00718.30
8.3.50.0070.00716.51
8.3.40.0040.01518.92
8.3.30.0030.01318.79
8.3.20.0080.00020.27
8.3.10.0040.00423.48
8.3.00.0040.00419.68
8.2.180.0160.00725.92
8.2.170.0150.00619.02
8.2.160.0070.01022.96
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00821.19
8.2.120.0080.00026.35
8.2.110.0090.00021.13
8.2.100.0090.00318.03
8.2.90.0000.00819.13
8.2.80.0090.00017.97
8.2.70.0030.00617.61
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0120.00018.16
8.2.30.0000.00718.18
8.2.20.0000.00818.14
8.2.10.0000.00718.14
8.2.00.0050.00218.20
8.1.280.0040.01525.92
8.1.270.0040.00422.32
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.32
8.1.230.0090.00317.77
8.1.220.0040.00417.76
8.1.210.0050.00318.77
8.1.200.0030.00717.48
8.1.190.0030.00617.35
8.1.180.0030.00618.10
8.1.170.0040.00418.62
8.1.160.0080.00018.96
8.1.150.0000.00720.37
8.1.140.0040.00417.71
8.1.130.0000.00719.14
8.1.120.0040.00417.56
8.1.110.0050.00317.54
8.1.100.0030.00617.63
8.1.90.0040.00417.62
8.1.80.0000.00817.55
8.1.70.0000.00717.58
8.1.60.0030.00517.67
8.1.50.0050.00317.53
8.1.40.0040.00417.67
8.1.30.0030.00617.70
8.1.20.0060.00317.83
8.1.10.0000.00717.65
8.1.00.0030.00717.63
8.0.300.0000.00718.77
8.0.290.0080.00016.88
8.0.280.0070.00318.44
8.0.270.0000.00817.06
8.0.260.0080.00017.00
8.0.250.0000.00717.16
8.0.240.0050.00317.17
8.0.230.0030.00317.12
8.0.220.0000.00717.16
8.0.210.0040.00417.12
8.0.200.0030.00317.14
8.0.190.0060.00317.08
8.0.180.0040.00417.04
8.0.170.0040.00417.16
8.0.160.0080.00017.16
8.0.150.0040.00417.12
8.0.140.0040.00416.93
8.0.130.0060.00013.49
8.0.120.0080.00016.95
8.0.110.0070.00017.05
8.0.100.0080.00016.98
8.0.90.0040.00417.07
8.0.80.0100.00717.04
8.0.70.0030.00517.03
8.0.60.0050.00216.97
8.0.50.0040.00417.09
8.0.30.0070.01317.13
8.0.20.0090.01117.40
8.0.10.0070.00017.20
8.0.00.0140.00516.85
7.4.330.0020.00215.55
7.4.320.0040.00416.67
7.4.300.0000.00616.78
7.4.290.0070.00016.78
7.4.280.0060.00316.61
7.4.270.0000.00816.75
7.4.260.0070.00016.58
7.4.250.0040.00416.69
7.4.240.0040.00416.75
7.4.230.0030.00316.71
7.4.220.0040.00416.51
7.4.210.0090.00616.75
7.4.200.0030.00316.54
7.4.160.0130.00416.76
7.4.150.0060.01317.40
7.4.140.0070.01117.86
7.4.130.0030.01416.59
7.4.120.0100.00816.71
7.4.110.0100.00716.83
7.4.100.0100.00716.81
7.4.90.0060.01616.75
7.4.80.0100.01019.39
7.4.70.0140.00516.42
7.4.60.0110.00716.50
7.4.50.0090.00616.39
7.4.40.0060.01016.75
7.4.10.0000.01615.46
7.4.00.0100.00515.10
7.3.330.0000.00613.14
7.3.320.0000.00513.13
7.3.310.0000.00716.32
7.3.300.0030.00316.38
7.3.290.0070.00916.38
7.3.280.0090.00816.43
7.3.270.0110.01117.40
7.3.260.0100.01116.45
7.3.240.0090.00816.43
7.3.230.0100.00716.62
7.3.210.0070.01016.43
7.3.200.0140.00316.79
7.3.190.0070.01116.60
7.3.180.0060.00916.59
7.3.170.0060.01216.65
7.3.160.0130.00316.52
7.3.130.0140.00314.85
7.3.120.0140.00415.18
7.3.110.0070.01014.82
7.3.100.0060.00615.14
7.3.90.0040.01215.16
7.3.80.0040.00414.94
7.3.70.0030.00614.95
7.3.60.0070.01114.96
7.3.50.0100.00014.87
7.3.40.0030.00914.73
7.3.30.0070.00714.79
7.3.20.0040.01116.84
7.3.10.0070.00416.88
7.3.00.0060.00816.87
7.2.330.0060.01216.63
7.2.320.0030.01316.70
7.2.310.0120.00416.42
7.2.300.0090.01416.71
7.2.290.0100.00716.53
7.2.260.0100.00715.11
7.2.250.0050.01114.80
7.2.240.0030.01415.07
7.2.230.0040.01415.16
7.2.220.0040.00915.14
7.2.210.0000.01715.08
7.2.200.0060.00614.78
7.2.190.0100.00315.24
7.2.180.0040.01114.91
7.2.170.0140.00314.88
7.2.160.0070.00314.96
7.2.150.0090.00616.80
7.2.140.0040.01416.77
7.2.130.0090.00616.83
7.2.120.0040.01116.77
7.2.110.0070.00316.92
7.2.100.0060.00616.83
7.2.90.0060.01017.07
7.2.80.0060.00917.02
7.2.70.0070.00717.02
7.2.60.0090.00616.91
7.2.50.0030.01316.83
7.2.40.0030.01016.71
7.2.30.0070.01016.75
7.2.20.0070.01018.28
7.2.10.0080.00918.56
7.2.00.0110.01118.44
7.1.330.0070.00715.73
7.1.320.0000.01716.13
7.1.310.0060.00915.93
7.1.300.0080.00315.88
7.1.290.0070.00715.97
7.1.280.0080.00315.99
7.1.270.0070.00416.10
7.1.260.0060.00616.11
7.1.250.0030.00615.85
7.1.240.0060.00815.91
7.1.230.0030.00615.96
7.1.220.0040.01115.55
7.1.210.0090.00315.77
7.1.200.0060.00815.96
7.1.190.0070.00715.99
7.1.180.0120.00316.05
7.1.170.0080.00515.63
7.1.160.0040.00815.83
7.1.150.0000.00915.95
7.1.140.0050.00917.52
7.1.130.0060.00917.33
7.1.120.0050.01217.13
7.1.110.0090.01017.05
7.1.100.0070.01017.08
7.1.90.0050.01216.92
7.1.80.0050.01217.21
7.1.70.0050.01016.48
7.1.60.0160.01425.48
7.1.50.0190.00925.42
7.1.40.0150.01225.30
7.1.30.0170.01125.16
7.1.20.0180.01325.33
7.1.10.0100.00916.13
7.1.00.0070.00815.50
7.0.330.0060.00615.54
7.0.320.0030.00815.78
7.0.310.0090.00315.50
7.0.300.0080.00815.58
7.0.290.0000.01215.46
7.0.280.0060.00915.46
7.0.270.0030.00915.55
7.0.260.0070.00715.65
7.0.250.0030.00815.27
7.0.240.0030.01315.39
7.0.230.0070.00715.42
7.0.220.0040.00815.71
7.0.210.0060.00615.30
7.0.200.0100.00315.63
7.0.190.0040.00715.48
7.0.180.0030.01015.59
7.0.170.0040.00715.41
7.0.160.0000.00815.73
7.0.150.0060.01015.52
7.0.140.0070.00315.45
7.0.130.0120.00015.53
7.0.120.0080.00315.62
7.0.110.0030.00915.55
7.0.100.0030.00615.14
7.0.90.0100.00715.25
7.0.80.0030.00915.60
7.0.70.0000.01415.74
7.0.60.0030.00615.29
7.0.50.0060.00915.30
7.0.40.0090.00613.52
7.0.30.0130.00313.52
7.0.20.0110.00013.52
7.0.10.0030.01013.55
7.0.00.0030.01013.74
5.6.400.0030.00914.17
5.6.390.0040.01114.41
5.6.380.0030.01314.50
5.6.370.0060.00914.07
5.6.360.0120.00014.23
5.6.350.0090.00313.94
5.6.340.0030.00914.45
5.6.330.0030.00914.48
5.6.320.0030.00614.20
5.6.310.0030.01314.60
5.6.300.0060.00914.37
5.6.290.0060.00614.27
5.6.280.0040.00714.40
5.6.270.0080.00514.20
5.6.260.0030.01014.31
5.6.250.0000.01214.35
5.6.240.0070.00314.24
5.6.230.0030.00914.29
5.6.220.0060.00614.16
5.6.210.0100.00314.16
5.6.200.0030.00714.13
5.6.190.0040.00714.00
5.6.180.0030.01114.34
5.6.170.0060.00613.97
5.6.160.0070.00714.45
5.6.150.0080.00614.18
5.6.140.0040.00714.15
5.6.130.0030.00714.34
5.6.120.0060.00614.52
5.6.110.0040.00714.08
5.6.100.0100.00314.09
5.6.90.0000.01114.31
5.6.80.0060.00314.14
5.6.70.0030.01214.09
5.6.60.0100.00014.22
5.6.50.0070.00314.09
5.6.40.0040.00714.21
5.6.30.0060.00914.18
5.6.20.0060.01014.23
5.6.10.0000.01414.06
5.6.00.0030.01013.83

preferences:
104.71 ms | 400 KiB | 5 Q