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.0120.00318.43
8.3.50.0030.01416.63
8.3.40.0060.00918.66
8.3.30.0080.00818.70
8.3.20.0030.00619.02
8.3.10.0040.00419.16
8.3.00.0030.00623.66
8.2.180.0180.00316.75
8.2.170.0140.00022.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00320.07
8.2.120.0080.00026.35
8.2.110.0070.00319.30
8.2.100.0060.00618.03
8.2.90.0080.00019.05
8.2.80.0130.00017.97
8.2.70.0050.00317.93
8.2.60.0050.00317.80
8.2.50.0000.00918.10
8.2.40.0040.00419.47
8.2.30.0030.00519.33
8.2.20.0000.01017.98
8.2.10.0040.00417.92
8.2.00.0000.00719.26
8.1.280.0150.00425.92
8.1.270.0050.00321.95
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0050.00522.50
8.1.230.0060.00617.64
8.1.220.0040.00717.74
8.1.210.0040.00418.77
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0050.00518.10
8.1.170.0000.00818.63
8.1.160.0000.00718.77
8.1.150.0030.00518.79
8.1.140.0040.00417.57
8.1.130.0030.00818.98
8.1.120.0000.00717.59
8.1.110.0000.00717.54
8.1.100.0000.00717.60
8.1.90.0020.00517.55
8.1.80.0030.00517.44
8.1.70.0000.00717.54
8.1.60.0040.00417.68
8.1.50.0030.00617.66
8.1.40.0060.00317.55
8.1.30.0000.00817.75
8.1.20.0000.00717.77
8.1.10.0000.00817.69
8.1.00.0000.00817.57
8.0.300.0040.00418.84
8.0.290.0020.00516.88
8.0.280.0030.00518.54
8.0.270.0000.00717.28
8.0.260.0000.00917.21
8.0.250.0080.00017.13
8.0.240.0000.00717.05
8.0.230.0030.00316.96
8.0.220.0000.00716.86
8.0.210.0000.00716.95
8.0.200.0030.00317.01
8.0.190.0000.00717.00
8.0.180.0040.00417.01
8.0.170.0030.00517.00
8.0.160.0050.00217.05
8.0.150.0040.00716.92
8.0.140.0000.00716.96
8.0.130.0050.00013.40
8.0.120.0040.00416.82
8.0.110.0000.00716.93
8.0.100.0000.00716.81
8.0.90.0000.00716.77
8.0.80.0020.01716.96
8.0.70.0050.00217.02
8.0.60.0040.00416.98
8.0.50.0000.00716.85
8.0.30.0050.01217.18
8.0.20.0110.00717.40
8.0.10.0030.00617.11
8.0.00.0150.00716.96
7.4.330.0040.00015.55
7.4.320.0030.00316.63
7.4.300.0030.00316.80
7.4.290.0000.00816.70
7.4.280.0040.00416.64
7.4.270.0030.00316.73
7.4.260.0000.00716.63
7.4.250.0000.00816.75
7.4.240.0030.00316.60
7.4.230.0000.00716.83
7.4.220.0050.00216.67
7.4.210.0080.01116.65
7.4.200.0000.00816.62
7.4.160.0070.01316.72
7.4.140.0090.01017.86
7.4.130.0040.01216.68
7.4.120.0100.00816.63
7.4.110.0140.00316.50
7.4.100.0130.00316.72
7.4.90.0080.00816.66
7.4.80.0090.01519.39
7.4.70.0130.00416.84
7.4.60.0110.01116.58
7.4.50.0100.00316.71
7.4.40.0090.00916.64
7.3.330.0050.00013.11
7.3.320.0030.00313.11
7.3.310.0030.00316.33
7.3.300.0020.00516.33
7.3.290.0000.00616.14
7.3.280.0060.01216.28
7.3.260.0080.00916.51
7.3.240.0080.00816.54
7.3.230.0140.00316.62
7.3.210.0070.01016.40
7.3.200.0100.00716.60
7.3.190.0030.01616.36
7.3.180.0080.00816.38
7.3.170.0090.00916.50
7.3.160.0130.00716.67
7.2.330.0090.01516.59
7.2.320.0030.02016.54
7.2.310.0060.01416.52
7.2.300.0100.00716.71
7.2.290.0110.01116.57

preferences:
52.22 ms | 401 KiB | 5 Q