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.70.0100.01016.75
8.3.60.0000.01518.39
8.3.50.0110.00716.30
8.3.40.0150.00018.84
8.3.30.0130.00318.76
8.3.20.0000.00818.97
8.3.10.0040.00418.99
8.3.00.0080.00023.52
8.2.180.0140.00716.63
8.2.170.0170.00322.96
8.2.160.0080.00520.40
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.95
8.2.120.0040.00426.35
8.2.110.0030.00622.25
8.2.100.0090.00317.91
8.2.90.0000.00819.04
8.2.80.0040.00418.22
8.2.70.0060.00317.90
8.2.60.0080.00018.04
8.2.50.0000.00818.10
8.2.40.0020.00519.42
8.2.30.0000.00719.46
8.2.20.0060.00317.98
8.2.10.0000.00817.94
8.2.00.0020.00519.31
8.1.280.0130.00925.92
8.1.270.0070.00022.15
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.88
8.1.230.0080.00317.71
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00517.35
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0050.00318.71
8.1.160.0000.00718.90
8.1.150.0040.00418.84
8.1.140.0070.00017.57
8.1.130.0100.00019.01
8.1.120.0000.00717.39
8.1.110.0070.00017.56
8.1.100.0040.00417.44
8.1.90.0050.00217.44
8.1.80.0030.00517.45
8.1.70.0000.00717.60
8.1.60.0030.00517.70
8.1.50.0030.00617.59
8.1.40.0060.00317.58
8.1.30.0000.00817.63
8.1.20.0030.00617.68
8.1.10.0000.00717.50
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0070.00018.38
8.0.270.0000.00717.31
8.0.260.0030.00617.28
8.0.250.0070.00017.08
8.0.240.0000.00817.09
8.0.230.0030.00316.95
8.0.220.0070.00016.95
8.0.210.0030.00316.96
8.0.200.0000.00616.93
8.0.190.0030.00616.99
8.0.180.0050.00317.00
8.0.170.0030.00516.94
8.0.160.0000.00716.90
8.0.150.0060.00316.86
8.0.140.0030.00316.93
8.0.130.0050.00013.38
8.0.120.0040.00416.94
8.0.110.0000.00817.01
8.0.100.0020.00516.96
8.0.90.0070.00016.96
8.0.80.0050.01116.92
8.0.70.0040.00417.00
8.0.60.0000.00716.96
8.0.50.0000.00716.91
8.0.30.0070.01117.03
8.0.20.0050.01417.40
8.0.10.0040.00417.10
8.0.00.0110.00816.97
7.4.330.0050.00015.55
7.4.320.0060.00016.65
7.4.300.0000.00616.75
7.4.290.0030.00316.71
7.4.280.0030.00616.71
7.4.270.0000.00716.69
7.4.260.0000.00616.71
7.4.250.0000.00716.74
7.4.240.0070.00016.67
7.4.230.0030.00316.49
7.4.220.0050.00216.84
7.4.210.0080.01016.68
7.4.200.0000.00716.48
7.4.160.0080.00816.49
7.4.140.0120.00817.86
7.4.130.0100.00616.66
7.4.120.0110.00916.73
7.4.110.0090.00916.55
7.4.100.0100.00716.52
7.4.90.0110.01116.60
7.4.80.0060.01319.39
7.4.70.0050.01116.47
7.4.60.0100.00716.54
7.4.50.0060.00916.47
7.4.40.0040.01816.67
7.3.330.0050.00013.23
7.3.320.0050.00012.99
7.3.310.0040.00416.29
7.3.300.0030.00316.19
7.3.290.0000.00716.27
7.3.280.0090.01216.29
7.3.260.0120.00716.48
7.3.240.0070.01016.35
7.3.230.0130.01016.41
7.3.210.0070.01016.39
7.3.200.0080.00816.39
7.3.190.0120.00916.36
7.3.180.0170.00016.61
7.3.170.0100.00616.46
7.3.160.0100.00716.59
7.2.330.0120.00616.64
7.2.320.0100.01316.53
7.2.310.0090.00916.63
7.2.300.0150.00316.68
7.2.290.0110.00616.66

preferences:
58.66 ms | 400 KiB | 5 Q