3v4l.org

run code in 300+ PHP versions simultaneously
<?php function replaceSingleQuotesInsideTags( $input ) { $output = preg_replace('/<[^>]*>/e', "str_replace(\"'\", \"\\\"\", '$0')", $input); echo $output; } replaceSingleQuotesInsideTags("On <A href=\"/home/' target='_self'>this</Apage you will find <SPAN STYLE='font-style: italic'>stuff</SPAN>"); ?>

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.00018.31
8.3.50.0070.00716.29
8.3.40.0070.00718.75
8.3.30.0040.01218.45
8.3.20.0040.00421.89
8.3.10.0050.00321.90
8.3.00.0040.00418.96
8.2.180.0120.00618.38
8.2.170.0120.00622.96
8.2.160.0070.01322.13
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0050.00320.35
8.2.120.0040.00426.35
8.2.110.0050.00522.20
8.2.100.0100.00317.75
8.2.90.0060.00319.28
8.2.80.0040.00418.04
8.2.70.0050.00317.50
8.2.60.0050.00318.04
8.2.50.0030.00518.10
8.2.40.0040.00420.51
8.2.30.0040.00419.31
8.2.20.0070.00318.03
8.2.10.0030.00517.94
8.2.00.0040.00418.11
8.1.280.0040.01125.92
8.1.270.0040.00423.73
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00320.88
8.1.230.0030.01017.76
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0060.00317.10
8.1.180.0040.00418.10
8.1.170.0050.00318.41
8.1.160.0000.00718.83
8.1.150.0000.00718.79
8.1.140.0080.00019.48
8.1.130.0030.00318.79
8.1.120.0050.00217.47
8.1.110.0000.00817.43
8.1.100.0040.00317.36
8.1.90.0000.00917.41
8.1.80.0000.00717.43
8.1.70.0000.00817.30
8.1.60.0040.00417.57
8.1.50.0040.00417.39
8.1.40.0030.00617.55
8.1.30.0040.00417.63
8.1.20.0040.00417.51
8.1.10.0080.00017.50
8.1.00.0070.00017.52
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0040.00417.25
8.0.260.0070.00018.66
8.0.250.0060.00017.04
8.0.240.0040.00417.04
8.0.230.0070.00017.02
8.0.220.0000.00916.83
8.0.210.0000.00716.77
8.0.200.0030.00316.94
8.0.190.0000.00816.92
8.0.180.0040.00416.93
8.0.170.0070.00016.91
8.0.160.0000.00816.86
8.0.150.0070.00016.92
8.0.140.0070.00016.84
8.0.130.0000.00513.36
8.0.120.0040.00416.84
8.0.110.0000.00716.96
8.0.100.0000.00716.93
8.0.90.0050.00316.89
8.0.80.0090.01216.92
8.0.70.0070.00016.74
8.0.60.0040.00416.90
8.0.50.0070.00016.86
8.0.30.0110.00816.98
8.0.20.0120.01017.40
8.0.10.0070.00016.93
8.0.00.0170.00317.09
7.4.330.0020.00215.55
7.4.320.0030.00316.55
7.4.300.0060.00016.52
7.4.290.0030.00316.52
7.4.280.0040.00416.57
7.4.270.0070.00016.50
7.4.260.0000.00613.27
7.4.250.0030.00316.51
7.4.240.0070.00016.63
7.4.230.0000.00716.50
7.4.220.0050.01316.61
7.4.210.0090.01216.52
7.4.200.0000.00716.34
7.4.160.0090.00816.51
7.4.150.0090.00917.40
7.4.140.0090.00717.86
7.4.130.0090.01516.54
7.4.120.0070.01216.56
7.4.110.0060.01216.50
7.4.100.0040.01516.46
7.4.90.0040.01516.51
7.4.80.0090.00619.39
7.4.70.0060.01016.66
7.4.60.0070.01016.57
7.4.50.0040.01516.26
7.4.40.0090.00916.69
7.4.30.0030.01416.45
7.4.00.0110.00714.89
7.3.330.0000.00613.34
7.3.320.0000.00513.34
7.3.310.0030.00616.36
7.3.300.0060.00016.37
7.3.290.0100.00816.37
7.3.280.0120.00816.35
7.3.270.0160.00017.40
7.3.260.0060.01116.37
7.3.250.0110.00916.40
7.3.240.0080.00816.53
7.3.230.0110.00716.22
7.3.210.0100.00716.60
7.3.200.0080.00816.27
7.3.190.0140.00716.41
7.3.180.0040.01116.34
7.3.170.0040.01516.66
7.3.160.0100.00716.39
7.2.330.0110.00716.84
7.2.320.0090.00916.93
7.2.310.0040.01516.85
7.2.300.0060.00916.70
7.2.290.0090.00916.76
7.2.60.0150.00416.91
7.2.50.0070.01017.30
7.2.00.0080.00419.44
7.1.200.0070.00415.85
7.1.70.0000.01017.39
7.1.60.0600.00733.63
7.1.50.0700.00333.02
7.1.40.0770.00732.94
7.1.30.0630.01332.91
7.1.20.0730.00332.73
7.1.10.0630.01315.09
7.1.00.0770.01014.93
7.0.200.0470.01015.04
7.0.190.0530.00714.80
7.0.180.0570.00714.66
7.0.170.0500.01014.83
7.0.160.0530.01314.48
7.0.150.0700.00314.52
7.0.140.0600.01714.50
7.0.130.0770.01315.05
7.0.120.0630.01015.07
7.0.110.0430.01014.73
7.0.100.0400.01714.41
7.0.90.0400.01014.45
7.0.80.0530.00314.90
7.0.70.0500.01014.56
7.0.60.0570.01314.55
7.0.50.0470.01314.64
7.0.40.0570.01014.77
7.0.30.0470.01014.76
7.0.20.0600.01014.83
7.0.10.0800.01314.69
7.0.00.0530.01314.94

preferences:
59.92 ms | 401 KiB | 5 Q