3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~(?:<p>(?=[^<>]*</p>)|\G(?!^))[^\d<>]*\d+\K\h~'; $str = '<p>My 90 days 123 work.</p>'; echo preg_replace($re, "&nbsp", $str);

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.4.120.0140.00523.96
8.4.110.0080.00620.63
8.4.100.0110.01018.22
8.4.90.0090.01220.66
8.4.80.0120.00720.80
8.4.70.0120.00818.89
8.4.60.0120.00920.86
8.4.50.0140.00720.61
8.4.40.0130.00620.68
8.4.30.0040.01521.94
8.4.20.0130.00317.89
8.4.10.0060.01323.80
8.3.250.0090.00718.86
8.3.240.0070.00617.12
8.3.230.0130.00516.77
8.3.220.0100.00718.70
8.3.210.0120.00916.63
8.3.200.0070.00216.71
8.3.190.0090.00917.17
8.3.180.0090.00918.92
8.3.170.0060.01117.07
8.3.160.0100.01018.68
8.3.150.0120.00617.05
8.3.140.0190.00016.66
8.3.130.0040.00718.39
8.3.120.0100.01018.97
8.3.110.0030.00620.94
8.3.100.0080.00824.06
8.3.90.0040.00426.77
8.3.80.0040.00418.18
8.3.70.0070.01116.63
8.3.60.0080.00816.88
8.3.50.0040.01816.72
8.3.40.0070.00720.52
8.3.30.0130.00320.53
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.290.0110.00817.15
8.2.280.0110.01020.41
8.2.270.0040.01416.81
8.2.260.0070.01118.83
8.2.250.0050.00318.52
8.2.240.0060.00318.79
8.2.230.0050.00322.58
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0090.00017.00
8.2.190.0070.00718.26
8.2.180.0110.01116.50
8.2.170.0100.01018.79
8.2.160.0030.01022.96
8.2.150.0090.00025.66
8.2.140.0090.00024.66
8.2.130.0050.00326.16
8.2.120.0050.00321.20
8.2.110.0090.00321.30
8.2.100.0100.00017.84
8.2.90.0050.00318.16
8.2.80.0000.00818.03
8.2.70.0000.00817.63
8.2.60.0180.00017.88
8.2.50.0160.00317.50
8.2.40.0120.00417.63
8.2.30.0090.00917.75
8.2.20.0170.00017.25
8.2.10.0000.01717.50
8.2.00.0000.01717.50
8.1.330.0080.01121.82
8.1.320.0110.00419.86
8.1.310.0130.00316.61
8.1.300.0130.00318.43
8.1.290.0080.00430.84
8.1.280.0120.00625.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.88
8.1.230.0000.01120.90
8.1.220.0030.00517.74
8.1.210.0040.00418.79
8.1.200.0050.00317.22
8.1.190.0060.01117.00
8.1.180.0080.00817.25
8.1.170.0100.00717.25
8.1.160.0090.00617.22
8.1.150.0170.00017.23
8.1.140.0130.00517.22
8.1.130.0100.00717.00
8.1.120.0150.00317.25
8.1.110.0120.00417.10
8.1.100.0130.00517.00
8.1.90.0130.00317.25
8.1.80.0120.00617.25
8.1.70.0160.00017.25
8.1.60.0130.00517.50
8.1.50.0150.00517.25
8.1.40.0100.00817.34
8.1.30.0050.01417.24
8.1.20.0200.00517.37
8.1.10.0150.00217.48
8.1.00.0140.00317.35
8.0.300.0040.00419.86
8.0.290.0080.00016.88
8.0.280.0160.00016.88
8.0.270.0110.00516.75
8.0.260.0130.00316.52
8.0.250.0140.00316.75
8.0.240.0140.00316.75
8.0.230.0100.00716.75
8.0.220.0170.00016.62
8.0.210.0090.00916.52
8.0.200.0000.01816.63
8.0.190.0070.01016.52
8.0.180.0130.00416.75
8.0.170.0110.00516.63
8.0.160.0080.00816.75
8.0.150.0170.00016.73
8.0.140.0100.00716.73
8.0.130.0130.00316.52
8.0.120.0130.00416.52
8.0.110.0120.00416.61
8.0.100.0130.00516.52
8.0.90.0100.00716.52
8.0.80.0130.00416.63
8.0.70.0170.00016.52
8.0.60.0120.00416.75
8.0.50.0130.00616.59
8.0.30.0100.00516.84
8.0.20.0150.00016.63
8.0.10.0110.00516.88

preferences:
27.24 ms | 403 KiB | 5 Q