3v4l.org

run code in 500+ PHP versions simultaneously
<?php $replacer = 'href="https://example.net"'; $homepage = preg_replace_callback('/<body.*?>(.*)<\/body>/', function($matches) use($replacer) { return preg_replace("/(?<=href=(\"|'))[^\"']+(?=(\"|'))/",$replacer,$matches[0]); },'<body><a class="attribute" href="https://mother.com"/> <a class="attribute" href="https://mothers.com"></a></body>'); echo $homepage;

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.5.70.0080.00916.93
8.5.60.0110.00617.08
8.5.50.0080.00616.90
8.5.30.0110.00820.27
8.5.20.0100.00819.46
8.5.10.0080.00918.61
8.5.00.0120.00920.07
8.4.220.0090.01119.79
8.4.210.0110.00719.90
8.4.180.0100.01222.00
8.4.170.0120.01020.53
8.4.160.0110.01023.96
8.4.150.0070.00517.84
8.4.140.0120.01017.82
8.4.130.0030.00618.86
8.4.120.0100.00924.24
8.4.110.0110.01020.64
8.4.100.0130.00718.73
8.4.90.0120.00822.12
8.4.80.0120.00918.70
8.4.70.0060.00317.84
8.4.60.0150.00618.51
8.4.50.0060.00318.09
8.4.40.0060.00317.79
8.4.30.0090.00920.27
8.4.20.0150.00318.13
8.4.10.0030.00618.05
8.3.310.0120.00418.73
8.3.300.0090.01120.97
8.3.290.0160.00920.96
8.3.280.0150.00620.22
8.3.270.0140.00816.66
8.3.260.0120.00716.70
8.3.250.0090.00818.85
8.3.240.0130.00617.13
8.3.230.0060.00416.61
8.3.220.0110.00618.83
8.3.210.0130.00818.43
8.3.200.0080.01216.62
8.3.190.0110.00717.09
8.3.180.0150.00216.73
8.3.170.0110.00720.95
8.3.160.0050.00317.05
8.3.150.0100.01017.53
8.3.140.0040.00417.40
8.3.130.0070.00416.77
8.3.120.0060.01219.03
8.3.110.0090.00020.94
8.3.100.0050.00517.00
8.3.90.0030.00526.77
8.3.80.0070.00318.54
8.3.70.0040.01116.88
8.3.60.0150.00416.75
8.3.50.0140.00418.36
8.3.40.0110.00320.52
8.3.30.0040.01218.70
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00926.16
8.2.310.0120.00718.27
8.2.300.0120.00822.21
8.2.290.0090.00722.54
8.2.280.0110.00818.43
8.2.270.0140.00417.31
8.2.260.0120.00617.03
8.2.250.0090.00616.88
8.2.240.0050.00517.16
8.2.230.0050.00322.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0030.00617.00
8.2.190.0060.01216.75
8.2.180.0120.00925.92
8.2.170.0150.00018.91
8.2.160.0000.01422.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0030.00719.15
8.2.110.0030.00622.43
8.2.100.0110.00017.97
8.2.90.0030.00617.88
8.2.80.0000.00818.98
8.2.70.0030.00617.88
8.2.60.0050.00318.05
8.2.50.0030.00618.07
8.2.40.0040.00418.14
8.2.30.0070.00318.14
8.2.20.0000.00720.48
8.2.10.0050.00217.84
8.2.00.0000.00819.41
8.1.340.0080.01121.76
8.1.330.0100.01022.25
8.1.320.0110.00916.68
8.1.310.0070.00718.43
8.1.300.0060.01016.59
8.1.290.0030.00618.88
8.1.280.0100.00725.92
8.1.270.0000.00822.17
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00020.43
8.1.230.0040.00717.79
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0040.00420.50
8.1.160.0040.00418.78
8.1.150.0040.00418.80
8.1.140.0050.00317.65
8.1.130.0040.00417.54
8.1.120.0030.00517.59
8.1.110.0000.00817.51
8.1.100.0030.00417.59
8.1.90.0000.00717.46
8.1.80.0000.00817.67
8.1.70.0030.00517.52
8.1.60.0070.00017.78
8.1.50.0030.00617.70
8.1.40.0090.00317.72
8.1.30.0060.00317.80
8.1.20.0040.00417.82
8.1.10.0030.00517.63
8.1.00.0040.00417.65
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0060.00320.28
8.0.270.0040.00419.91
8.0.260.0050.00316.99
8.0.250.0000.00717.07
8.0.240.0050.00216.96
8.0.230.0030.00517.10
8.0.220.0000.00817.00
8.0.210.0000.00717.04
8.0.200.0070.00017.21
8.0.190.0040.00417.12
8.0.180.0000.00717.04
8.0.170.0060.00317.05
8.0.160.0120.00016.93
8.0.150.0000.00716.99
8.0.140.0070.00016.98
8.0.130.0000.00716.99
8.0.120.0040.00417.07
8.0.110.0070.00016.87
8.0.100.0000.00716.93
8.0.90.0020.00517.00
8.0.80.0000.00717.06
8.0.70.0040.00417.02
8.0.60.0040.00416.93
8.0.50.0040.00417.05
8.0.30.0040.00417.02
8.0.20.0000.00717.05
8.0.10.0070.00017.02
7.4.330.0050.00015.55
7.4.320.0030.00316.72
7.4.300.0060.00016.70
7.4.290.0000.00716.78
7.4.280.0040.00416.83
7.4.270.0080.00016.72
7.4.260.0030.00316.87
7.4.250.0030.00316.70
7.4.240.0030.00316.63
7.4.230.0000.00716.82
7.4.220.0000.00716.71
7.4.210.0040.00416.75
7.4.200.0040.00416.83
7.4.190.0030.00316.79
7.4.180.0030.00316.88
7.4.160.0070.00016.71
7.4.150.0030.00316.71
7.4.140.0000.00716.58
7.4.130.0050.00216.71
7.4.120.0000.00716.74
7.4.110.0000.00716.65
7.4.100.0030.00316.83
7.4.90.0050.00216.59
7.4.80.0000.00716.64
7.4.70.0030.00316.54
7.4.60.0070.00016.65
7.4.50.0000.00816.57
7.4.40.0000.00716.67
7.4.30.0000.00716.78
7.4.20.0000.00716.52
7.4.10.0000.00816.68
7.4.00.0000.00816.85

preferences:
106.15 ms | 1283 KiB | 5 Q