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.0110.00418.26
8.3.50.0090.00916.65
8.3.40.0090.00618.79
8.3.30.0090.00618.89
8.3.20.0030.00519.21
8.3.10.0090.00021.21
8.3.00.0080.00023.61
8.2.180.0130.01016.34
8.2.170.0120.00322.96
8.2.160.0030.01220.52
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0030.00619.95
8.2.120.0070.00026.35
8.2.110.0090.00022.37
8.2.100.0090.00317.90
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0000.00817.88
8.2.60.0040.00417.92
8.2.50.0060.00318.10
8.2.40.0040.00419.34
8.2.30.0000.00719.37
8.2.20.0060.00618.13
8.2.10.0000.00717.95
8.2.00.0000.00719.42
8.1.280.0110.00725.92
8.1.270.0060.00322.16
8.1.260.0090.00626.35
8.1.250.0050.00328.09
8.1.240.0030.00721.18
8.1.230.0060.00617.66
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0080.00017.23
8.1.180.0030.00718.10
8.1.170.0050.00318.65
8.1.160.0040.00418.84
8.1.150.0000.00718.84
8.1.140.0050.00217.55
8.1.130.0050.00518.93
8.1.120.0000.00817.43
8.1.110.0000.00717.53
8.1.100.0000.00717.52
8.1.90.0040.00417.38
8.1.80.0050.00317.53
8.1.70.0030.00317.56
8.1.60.0080.00017.70
8.1.50.0000.00817.42
8.1.40.0030.00617.54
8.1.30.0000.00817.63
8.1.20.0040.00417.69
8.1.10.0020.00517.52
8.1.00.0030.00617.57
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00818.37
8.0.270.0000.00717.30
8.0.260.0000.00817.27
8.0.250.0030.00317.07
8.0.240.0040.00417.13
8.0.230.0020.00517.03
8.0.220.0000.00816.88
8.0.210.0000.00716.97
8.0.200.0070.00016.95
8.0.190.0050.00317.02
8.0.180.0040.00416.95
8.0.170.0000.00816.95
8.0.160.0070.00016.95
8.0.150.0000.00816.79
8.0.140.0030.00316.86
8.0.130.0030.00313.45
8.0.120.0070.00016.93
8.0.110.0070.00017.01
8.0.100.0070.00016.96
8.0.90.0040.00416.95
8.0.80.0070.00817.01
8.0.70.0040.00416.81
8.0.60.0040.00417.00
8.0.50.0040.00417.05
8.0.30.0140.00317.06
8.0.20.0140.00717.44
8.0.10.0000.00717.11
8.0.00.0140.00716.79
7.4.330.0040.00015.55
7.4.320.0030.00316.60
7.4.300.0030.00616.70
7.4.290.0070.00016.74
7.4.280.0000.00716.61
7.4.270.0000.00716.66
7.4.260.0000.00816.52
7.4.250.0080.00016.46
7.4.240.0030.00516.66
7.4.230.0050.00316.71
7.4.220.0000.00716.68
7.4.210.0090.00616.79
7.4.200.0040.00416.54
7.4.160.0080.00916.63
7.4.140.0130.00717.86
7.4.130.0120.00316.60
7.4.120.0100.01016.62
7.4.110.0070.01016.54
7.4.100.0070.01016.47
7.4.90.0100.00616.90
7.4.80.0060.01619.39
7.4.70.0150.00616.73
7.4.60.0140.00316.67
7.4.50.0060.00916.49
7.4.40.0090.01316.60
7.3.330.0050.00013.09
7.3.320.0000.00613.00
7.3.310.0030.00316.28
7.3.300.0000.00716.12
7.3.290.0000.00716.20
7.3.280.0070.01416.23
7.3.260.0070.01116.56
7.3.240.0050.01216.40
7.3.230.0030.01616.19
7.3.210.0030.01316.50
7.3.200.0100.00716.64
7.3.190.0110.00916.54
7.3.180.0090.00616.64
7.3.170.0090.00816.36
7.3.160.0060.00916.38
7.2.330.0070.01716.65
7.2.320.0000.02116.45
7.2.310.0100.01016.67
7.2.300.0130.00316.64
7.2.290.0100.00616.61

preferences:
57.24 ms | 401 KiB | 5 Q