3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ' 55шт.'; $pattern = '/([0-9]+)(\s?шт\.+)/i'; $replacement = '$1'; echo preg_replace($pattern, $replacement, $string);

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.0070.00718.39
8.3.50.0070.01416.66
8.3.40.0070.00718.60
8.3.30.0060.00918.98
8.3.20.0080.00018.98
8.3.10.0030.00621.09
8.3.00.0030.00523.54
8.2.180.0160.00616.62
8.2.170.0100.01018.91
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00519.95
8.2.120.0050.00326.35
8.2.110.0100.00019.39
8.2.100.0060.00618.09
8.2.90.0090.00019.16
8.2.80.0100.00017.97
8.2.70.0000.00817.79
8.2.60.0000.00817.93
8.2.50.0090.00018.10
8.2.40.0080.00019.43
8.2.30.0080.00019.37
8.2.20.0070.00318.07
8.2.10.0040.00417.94
8.2.00.0070.00019.44
8.1.280.0200.00325.92
8.1.270.0000.00822.20
8.1.260.0030.01226.35
8.1.250.0030.00628.09
8.1.240.0030.00721.36
8.1.230.0070.00317.70
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0030.00517.35
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0000.00818.65
8.1.160.0040.00418.78
8.1.150.0000.00818.85
8.1.140.0040.00417.66
8.1.130.0040.00819.02
8.1.120.0050.00317.56
8.1.110.0040.00417.45
8.1.100.0070.00017.55
8.1.90.0040.00417.51
8.1.80.0050.00217.55
8.1.70.0030.00317.44
8.1.60.0050.00317.54
8.1.50.0030.00717.61
8.1.40.0040.00417.66
8.1.30.0000.00817.57
8.1.20.0000.00717.75
8.1.10.0080.00017.65
8.1.00.0060.00317.44
8.0.300.0000.00818.78
8.0.290.0080.00016.63
8.0.280.0050.00318.39
8.0.270.0040.00417.33
8.0.260.0000.00817.26
8.0.250.0000.00717.08
8.0.240.0000.00816.99
8.0.230.0030.00316.91
8.0.220.0000.00716.96
8.0.210.0000.00816.96
8.0.200.0040.00416.96
8.0.190.0080.00016.89
8.0.180.0050.00316.89
8.0.170.0000.00816.94
8.0.160.0000.00717.05
8.0.150.0040.00416.86
8.0.140.0030.00316.88
8.0.130.0060.00013.41
8.0.120.0040.00417.00
8.0.110.0040.00416.96
8.0.100.0080.00017.00
8.0.90.0030.00316.82
8.0.80.0060.01016.90
8.0.70.0040.00416.96
8.0.60.0000.00716.92
8.0.50.0040.00417.07
8.0.30.0120.00617.18
8.0.20.0120.00817.40
8.0.10.0070.00017.07
8.0.00.0100.01016.89
7.4.330.0000.00515.55
7.4.320.0030.00316.55
7.4.300.0000.00716.74
7.4.290.0040.00416.74
7.4.280.0030.00516.66
7.4.270.0040.00416.66
7.4.260.0000.00716.72
7.4.250.0030.00316.59
7.4.240.0030.00316.64
7.4.230.0000.00716.57
7.4.220.0070.00016.76
7.4.210.0080.01116.64
7.4.200.0000.00716.75
7.4.160.0100.00616.77
7.4.140.0110.00917.86
7.4.130.0160.00016.55
7.4.120.0090.01116.58
7.4.110.0110.00716.79
7.4.100.0040.01316.55
7.4.90.0070.01116.65
7.4.80.0140.00419.39
7.4.70.0030.01316.63
7.4.60.0070.01116.47
7.4.50.0070.01016.63
7.4.40.0000.02116.65
7.3.330.0030.00313.18
7.3.320.0000.00513.15
7.3.310.0000.00716.13
7.3.300.0030.00316.30
7.3.290.0030.00516.36
7.3.280.0110.01016.32
7.3.260.0080.01016.43
7.3.240.0110.00816.58
7.3.230.0120.00416.70
7.3.210.0070.01016.57
7.3.200.0050.01116.26
7.3.190.0030.01316.52
7.3.180.0060.00916.28
7.3.170.0150.00616.48
7.3.160.0100.00516.48
7.2.330.0200.00316.64
7.2.320.0060.01316.64
7.2.310.0040.01516.71
7.2.300.0100.00716.45
7.2.290.0030.01316.62

preferences:
58.32 ms | 401 KiB | 5 Q