3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_replace (string $fullText, string $searchText) { $searches = str_replace(' ', '|', $searchText); return preg_replace("/\b(?:$searches)\b\K/i", "<-", $fullText); } echo my_replace('A week ago, Elvis left the Building', 'elvis left');

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.10.0090.01016.82
8.5.00.0160.00620.31
8.4.160.0140.00923.95
8.4.150.0010.00114.05
8.4.140.0090.01117.72
8.4.130.0130.00717.96
8.4.120.0150.00624.23
8.4.110.0110.00818.82
8.4.100.0140.00517.70
8.4.90.0120.00919.48
8.4.80.0150.00617.93
8.4.70.0040.00517.93
8.4.60.0070.00518.11
8.4.50.0110.01018.16
8.4.40.0130.00617.76
8.4.30.0080.00017.90
8.4.20.0100.01020.46
8.4.10.0100.00718.05
8.3.280.0020.00114.05
8.3.270.0140.00716.54
8.3.260.0110.00916.76
8.3.250.0120.00619.04
8.3.240.0130.00616.61
8.3.230.0100.00916.57
8.3.220.0070.00517.06
8.3.210.0120.00916.97
8.3.200.0040.00416.94
8.3.190.0120.00617.06
8.3.180.0050.00317.05
8.3.170.0100.00919.05
8.3.160.0090.00917.05
8.3.150.0110.00417.16
8.3.140.0120.00619.00
8.3.130.0080.00016.88
8.3.120.0040.00419.03
8.3.110.0030.00720.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00617.97
8.3.70.0080.00816.90
8.3.60.0140.00718.35
8.3.50.0080.01018.34
8.3.40.0060.00918.79
8.3.30.0090.00618.88
8.3.20.0060.00318.82
8.3.10.0040.00419.02
8.3.00.0040.00423.60
8.2.290.0120.00720.81
8.2.280.0100.00920.37
8.2.270.0110.00717.20
8.2.260.0070.00316.43
8.2.250.0040.00416.73
8.2.240.0080.00016.92
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0070.00316.63
8.2.190.0040.01118.67
8.2.180.0160.00318.79
8.2.170.0070.00722.96
8.2.160.0100.00322.43
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00021.19
8.2.110.0090.00321.16
8.2.100.0080.00417.97
8.2.90.0080.00018.03
8.2.80.0080.00019.16
8.2.70.0080.00017.68
8.2.60.0040.00418.09
8.2.50.0040.00418.10
8.2.40.0040.00420.99
8.2.30.0040.00420.61
8.2.20.0000.00718.10
8.2.10.0030.00617.96
8.2.00.0080.00018.29
8.1.330.0100.00422.04
8.1.320.0120.00716.13
8.1.310.0040.00418.31
8.1.300.0060.00316.28
8.1.290.0030.00630.84
8.1.280.0070.01025.92
8.1.270.0080.00020.39
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0060.00319.39
8.1.230.0030.00821.04
8.1.220.0050.00317.74
8.1.210.0030.00518.80
8.1.200.0030.00617.48
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0000.00818.63
8.1.160.0040.00418.76
8.1.150.0070.00018.84
8.1.140.0000.00818.85
8.1.130.0030.00320.23
8.1.120.0000.00817.46
8.1.110.0040.00417.53
8.1.100.0070.00317.55
8.1.90.0040.00417.47
8.1.80.0020.00517.53
8.1.70.0040.00417.43
8.1.60.0050.00317.76
8.1.50.0040.00417.63
8.1.40.0040.00417.65
8.1.30.0050.00317.76
8.1.20.0040.00417.80
8.1.10.0000.00717.66
8.1.00.0030.00517.61
8.0.300.0040.00420.04
8.0.290.0040.00416.88
8.0.280.0070.00018.46
8.0.270.0040.00417.09
8.0.260.0040.00418.48
8.0.250.0000.00717.11
8.0.240.0030.00317.15
8.0.230.0000.00717.14
8.0.220.0000.00716.98
8.0.210.0000.00717.07
8.0.200.0030.00317.17
8.0.190.0050.00217.07
8.0.180.0090.00017.16
8.0.170.0030.00617.03
8.0.160.0040.00417.04
8.0.150.0000.00717.03
8.0.140.0040.00416.98
8.0.130.0030.00313.51
8.0.120.0000.00717.08
8.0.110.0030.00516.91
8.0.100.0020.00517.09
8.0.90.0080.00017.08
8.0.80.0090.00617.07
8.0.70.0030.00516.99
8.0.60.0040.00416.96
8.0.50.0040.00417.15
8.0.30.0120.00817.25
8.0.20.0090.01217.40
8.0.10.0000.00717.12
8.0.00.0130.00816.86
7.4.330.0000.00515.55
7.4.320.0030.00316.78
7.4.300.0030.00316.57
7.4.290.0070.00016.79
7.4.280.0030.00616.71
7.4.270.0000.01116.80
7.4.260.0040.00416.70
7.4.250.0040.00416.67
7.4.240.0000.00816.74
7.4.230.0000.00716.90
7.4.220.0000.00716.52
7.4.210.0100.00716.78
7.4.200.0030.00316.79
7.4.160.0110.00616.67
7.4.140.0120.00917.86
7.4.130.0090.01016.86
7.4.120.0090.00816.62
7.4.110.0070.01016.75
7.4.100.0110.00616.72
7.4.90.0030.02216.93
7.4.80.0140.01019.39
7.4.70.0120.00716.77
7.4.60.0150.00616.67
7.4.50.0060.00616.67
7.4.40.0190.00416.89
7.4.00.0020.01415.07
7.3.330.0050.00013.51
7.3.320.0000.00513.49
7.3.310.0030.00316.59
7.3.300.0050.00216.36
7.3.290.0000.00716.57
7.3.280.0140.00016.54
7.3.260.0110.01116.72
7.3.240.0090.00816.70
7.3.230.0030.01416.80
7.3.210.0110.00716.95
7.3.200.0130.00316.56
7.3.190.0030.01516.75
7.3.180.0150.00316.46
7.3.170.0070.01016.73
7.3.160.0100.00616.72
7.3.120.0040.01314.88
7.3.110.0080.00815.11
7.3.100.0090.00515.24
7.3.90.0040.00814.84
7.3.80.0060.00815.20
7.3.70.0040.01014.96
7.3.60.0110.00215.10
7.3.50.0040.01014.94
7.3.40.0060.00815.00
7.3.30.0060.00314.94
7.3.20.0090.00516.96
7.3.10.0020.01516.74
7.3.00.0090.00616.85
7.2.330.0100.01416.64
7.2.320.0000.01916.63
7.2.310.0090.00916.59
7.2.300.0070.01016.79
7.2.290.0070.01016.88
7.2.250.0100.00715.34
7.2.240.0080.00715.31
7.2.230.0020.01415.17
7.2.220.0060.00415.08
7.2.210.0040.01015.37
7.2.200.0050.00815.07
7.2.190.0070.00715.11
7.2.180.0110.00915.28
7.2.170.0060.00915.29
7.2.160.0000.00915.13
7.2.150.0050.01217.23
7.2.140.0090.00616.87
7.2.130.0060.00616.88
7.2.120.0000.00817.21
7.2.110.0040.01117.25
7.2.100.0870.01016.13
7.2.90.1230.00216.05
7.2.80.1040.01015.89
7.2.70.0910.00816.26
7.2.60.1110.00616.16
7.2.50.0990.01016.12
7.2.40.1120.01016.06
7.2.30.0770.00515.95
7.2.20.0980.00316.02
7.2.10.0970.01216.21
7.2.00.1000.01216.11
7.1.330.0020.01315.94
7.1.320.0040.00716.01
7.1.310.0050.00615.83
7.1.300.0060.00715.81
7.1.290.0120.00215.95
7.1.280.0050.00915.80
7.1.270.0060.00815.92
7.1.260.0040.00615.96
7.1.250.0000.01515.82
7.1.220.1390.01314.03
7.1.210.2240.01214.00
7.1.200.1580.01013.93
7.1.190.1840.00613.91
7.1.180.2500.00314.18
7.1.170.2060.00614.25
7.1.160.2270.00713.88
7.1.150.2090.00713.92
7.1.140.2150.00314.02
7.1.130.1830.01014.26
7.1.120.1970.00313.93
7.1.110.1880.01014.15
7.1.100.2030.00713.93
7.1.90.2140.01014.18
7.1.80.2280.00714.23
7.1.70.2490.01014.11
7.1.60.2340.01732.30
7.1.50.2430.00632.19
7.1.40.2280.01731.66
7.1.30.2840.01631.89
7.1.20.2580.00731.79
7.1.10.1780.00714.25
7.1.00.1670.01014.16
5.6.380.0090.00614.03

preferences:
33.36 ms | 403 KiB | 5 Q