3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = "LOL='a,`=/0+4Aq|8,l@DsAK,4Y~t}BWHozy;w`O!dFnLi]/1TF9(jb.*4MR9l2iD5rh^'"; var_dump($val); list($name, $value) = explode('=', $val, 2); $regexPattern = sprintf( '/^ %1$s # match a quote at the start of the value ( # capturing sub-pattern used (?: # we do not need to capture this [^%1$s\\\\] # any character other than a quote or backslash |\\\\\\\\ # or two backslashes together |\\\\%1$s # or an escaped quote e.g \" )* # as many characters that match the previous rules ) # end of the capturing sub-pattern %1$s # and the closing quote .*$ # and discard any string after the closing quote /mx', $quote ); $value = preg_replace($regexPattern, '$1', $value); $value = str_replace("\\$quote", $quote, $value); $value = str_replace('\\\\', '\\', $value); var_dump($value);

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.00417.00
8.3.50.0070.00716.40
8.3.40.0120.00318.92
8.3.30.0070.00718.90
8.3.20.0040.00419.96
8.3.10.0080.00021.87
8.3.00.0000.00823.67
8.2.180.0100.00716.72
8.2.170.0090.00622.96
8.2.160.0030.01020.41
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0030.00621.05
8.2.120.0030.01026.35
8.2.110.0090.00021.18
8.2.100.0040.00818.03
8.2.90.0030.00519.34
8.2.80.0050.00317.97
8.2.70.0070.00317.88
8.2.60.0040.00418.05
8.2.50.0000.00918.10
8.2.40.0040.00422.39
8.2.30.0000.00719.64
8.2.20.0040.00418.05
8.2.10.0000.00718.25
8.2.00.0040.00418.18
8.1.270.0000.00822.32
8.1.260.0000.00828.09
8.1.250.0000.00828.09
8.1.240.0060.00324.02
8.1.230.0070.00319.67
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0000.00917.48
8.1.190.0030.00617.48
8.1.180.0060.00318.10
8.1.170.0040.00418.77
8.1.160.0040.00420.82
8.1.150.0000.00818.82
8.1.140.0030.00619.57
8.1.130.0000.00717.61
8.1.120.0000.00717.51
8.1.110.0000.00817.51
8.1.100.0060.00317.59
8.1.90.0020.00517.61
8.1.80.0030.00517.62
8.1.70.0000.00717.57
8.1.60.0040.00417.62
8.1.50.0080.00017.70
8.1.40.0080.00017.61
8.1.30.0060.00317.81
8.1.20.0000.00917.79
8.1.10.0000.00817.70
8.1.00.0040.00417.73
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0000.00818.51
8.0.270.0030.00317.19
8.0.260.0060.00317.32
8.0.250.0030.00317.20
8.0.240.0000.00717.11
8.0.230.0030.00317.07
8.0.220.0050.00317.13
8.0.210.0070.00017.16
8.0.200.0000.00717.11
8.0.190.0040.00417.23
8.0.180.0030.00617.19
8.0.170.0080.00017.10
8.0.160.0050.00217.07
8.0.150.0000.00717.13
8.0.140.0000.00816.99
8.0.130.0000.00713.58
8.0.120.0060.00317.07
8.0.110.0000.00817.11
8.0.100.0100.00017.20
8.0.90.0080.00016.95
8.0.80.0060.01017.14
8.0.70.0040.00416.98
8.0.60.0000.00817.04
8.0.50.0040.00417.11
8.0.30.0130.00417.21
8.0.20.0100.00917.45
8.0.10.0080.00017.07
8.0.00.0090.00917.19
7.4.330.0050.00016.79
7.4.320.0030.00316.79
7.4.300.0000.00816.78
7.4.290.0000.00716.68
7.4.280.0000.00716.70
7.4.270.0030.00316.68
7.4.260.0000.00716.66
7.4.250.0050.00316.62
7.4.240.0080.00016.79
7.4.230.0000.00716.61
7.4.220.0100.00716.60
7.4.210.0060.01016.74
7.4.200.0000.00716.67
7.4.160.0100.00616.71
7.4.150.0090.01217.40
7.4.140.0150.00917.86
7.4.130.0160.00616.77
7.4.120.0070.00916.71
7.4.110.0100.00716.71
7.4.100.0000.01716.57
7.4.90.0130.00716.64
7.4.80.0110.00719.39
7.4.70.0120.00416.79
7.4.60.0090.00916.82
7.4.50.0070.00716.69
7.4.40.0110.00516.74
7.4.30.0180.00716.70
7.4.00.0000.01314.95
7.3.330.0050.00013.25
7.3.320.0050.00013.32
7.3.310.0070.00016.50
7.3.300.0000.00716.41
7.3.290.0000.00716.44
7.3.280.0100.00816.44
7.3.270.0070.01717.40
7.3.260.0040.01216.54
7.3.240.0110.00816.56
7.3.230.0180.00016.45
7.3.210.0110.00616.55
7.3.200.0070.01019.39
7.3.190.0120.00916.66
7.3.180.0090.00916.73
7.3.170.0080.00816.69
7.3.160.0140.00416.76
7.2.330.0150.00416.75
7.2.320.0090.01216.60
7.2.310.0110.00816.61
7.2.300.0120.00916.67
7.2.290.0040.01316.68
7.2.60.0030.01317.09
7.2.00.0040.00819.54
7.1.200.0030.01015.75
7.1.100.0070.00718.25
7.1.70.0040.00417.37
7.1.60.0140.01119.40
7.1.50.0040.01816.84
7.1.00.0130.06722.35
7.0.200.0770.00315.17
7.0.60.0130.07721.66
7.0.50.0070.05017.85
7.0.40.0030.05720.07
7.0.30.0270.04320.04
7.0.20.0370.07020.18
7.0.10.0170.07720.11
7.0.00.0100.08020.14
5.6.280.0030.03021.14
5.6.210.0130.05320.50
5.6.200.0070.07318.24
5.6.190.0130.05320.32
5.6.180.0230.07720.66
5.6.170.0070.05020.55
5.6.160.0070.04020.55
5.6.150.0130.06318.28
5.6.140.0030.08718.20
5.6.130.0100.07718.13
5.6.120.0100.03721.08
5.6.110.0170.07321.14
5.6.100.0170.08021.10
5.6.90.0130.03720.91
5.6.80.0100.07020.40
5.5.350.0330.07320.52
5.5.340.0070.05718.08
5.5.330.0030.07720.21
5.5.320.0230.04020.47
5.5.310.0300.06720.34
5.5.300.0030.05018.07
5.5.290.0070.06018.07
5.5.280.0070.06320.82
5.5.270.0030.06020.90
5.5.260.0200.06320.86
5.5.250.0130.06720.69
5.5.240.0300.07320.11

preferences:
86.09 ms | 400 KiB | 5 Q