3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string=' دد'; var_dump(preg_replace('#(?:^\s+|\s+$)#u', '', $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.4.20.0130.00717.87
8.4.10.0090.00019.57
8.3.150.0070.01318.95
8.3.140.0060.01220.57
8.3.130.0140.00418.91
8.3.120.0060.00318.88
8.3.110.0060.00320.94
8.3.100.0030.00616.74
8.3.90.0040.00426.77
8.3.80.0090.00016.88
8.3.70.0120.00416.58
8.3.60.0070.00718.55
8.3.50.0120.01021.33
8.3.40.0040.01118.96
8.3.30.0110.00418.96
8.3.20.0040.00418.86
8.3.10.0000.00820.57
8.3.00.0070.00417.75
8.2.260.0080.00019.10
8.2.250.0100.01018.69
8.2.240.0140.00416.92
8.2.230.0090.00022.58
8.2.220.0130.00037.54
8.2.210.0040.00426.77
8.2.200.0060.00317.00
8.2.190.0140.01116.63
8.2.180.0070.00725.92
8.2.170.0160.00618.79
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00021.12
8.2.110.0070.00421.21
8.2.100.0080.00418.03
8.2.90.0030.00619.52
8.2.80.0050.00318.16
8.2.70.0000.00817.75
8.2.60.0000.00917.75
8.2.50.0080.00017.63
8.2.40.0040.00418.16
8.2.30.0000.00919.54
8.2.20.0040.00417.80
8.2.10.0040.00417.97
8.2.00.0040.00417.88
8.1.310.0040.00416.88
8.1.300.0080.00018.06
8.1.290.0040.00430.84
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00922.66
8.1.230.0070.00422.09
8.1.220.0050.00317.79
8.1.210.0030.00618.79
8.1.200.0000.00917.47
8.1.190.0040.00717.35
8.1.180.0040.00418.10
8.1.170.0030.00618.45
8.1.160.0070.00018.91
8.1.150.0040.00418.70
8.1.140.0040.00417.59
8.1.130.0000.00717.82
8.1.120.0000.00717.55
8.1.110.0000.00717.59
8.1.100.0050.00217.54
8.1.90.0040.00417.52
8.1.80.0000.00717.43
8.1.70.0000.00817.55
8.1.60.0050.00317.72
8.1.50.0050.00217.46
8.1.40.0020.00517.54
8.1.30.0000.00717.63
8.1.20.0040.00417.73
8.1.10.0060.00317.53
8.1.00.0000.00717.50
8.0.300.0040.00419.88
8.0.290.0000.00716.75
8.0.280.0000.00818.34
8.0.270.0030.00316.88
8.0.260.0000.00718.75
8.0.250.0000.00717.09
8.0.240.0090.00017.15
8.0.230.0000.00717.13
8.0.220.0040.00417.10
8.0.210.0070.00017.12
8.0.200.0000.00717.21
8.0.190.0030.00317.02
8.0.180.0000.00817.11
8.0.170.0030.00617.03
8.0.160.0000.00717.16
8.0.150.0000.00817.07
8.0.140.0030.00716.89
8.0.130.0000.00713.48
8.0.120.0000.00717.05
8.0.110.0030.00617.20
8.0.100.0040.00416.99
8.0.90.0070.00017.09
8.0.80.0030.01217.01
8.0.70.0040.00417.13
8.0.60.0070.00017.03
8.0.50.0070.00016.96
8.0.30.0090.01117.09
8.0.20.0090.00917.40
8.0.10.0040.00417.10
8.0.00.0070.01016.91
7.4.330.0050.00014.91
7.4.320.0000.00616.79
7.4.300.0030.00316.66
7.4.290.0000.00716.59
7.4.280.0030.00516.79
7.4.270.0030.00316.86
7.4.260.0060.00013.44
7.4.250.0040.00416.75
7.4.240.0060.00216.75
7.4.230.0030.00316.88
7.4.220.0030.01516.71
7.4.210.0070.00816.74
7.4.200.0040.00416.74
7.4.190.0070.00016.90
7.4.160.0030.01316.53
7.4.150.0090.00917.40
7.4.140.0100.00717.28
7.4.130.0110.01116.59
7.4.120.0100.00716.64
7.4.110.0130.00716.54
7.4.100.0100.01316.67
7.4.90.0060.01216.84
7.4.80.0160.00619.03
7.4.70.0120.00616.62
7.4.60.0110.00616.52
7.4.50.0000.00916.50
7.4.40.0090.00922.27
7.4.30.0130.00316.67
7.4.00.0090.00614.84
7.3.330.0050.00013.24
7.3.320.0060.00013.23
7.3.310.0030.00316.43
7.3.300.0000.00616.37
7.3.290.0090.00616.32
7.3.280.0120.00916.33
7.3.270.0090.00917.40
7.3.260.0140.00618.24
7.3.250.0090.01116.44
7.3.240.0060.01616.34
7.3.230.0000.01716.43
7.3.210.0080.00816.36
7.3.200.0190.00419.39
7.3.190.0090.01316.41
7.3.180.0150.00616.34
7.3.170.0120.00816.59
7.3.160.0100.00616.33
7.3.120.0090.00615.15
7.2.330.0030.01416.54
7.2.320.0140.00316.54
7.2.310.0090.01616.47
7.2.300.0100.00716.70
7.2.290.0060.00916.43
7.2.60.0040.00816.86
7.2.00.0030.00919.06
7.1.200.0000.01415.54
7.1.100.0000.01218.53
7.1.70.0000.00717.15
7.1.60.0120.01219.40
7.1.50.0070.01017.20
7.1.00.0070.07722.32
7.0.200.0110.00816.54
7.0.140.0070.07021.97
7.0.60.0130.05319.80
7.0.50.0000.09017.68
7.0.40.0030.05320.29
7.0.30.0330.05320.21
7.0.20.0200.08320.03
7.0.10.0270.08020.24
7.0.00.0070.04320.05
5.6.280.0070.06721.09
5.6.210.0030.08320.54
5.6.200.0070.08318.12
5.6.190.0000.04720.57
5.6.180.0330.06020.43
5.6.170.0400.07320.69
5.6.160.0070.06020.71
5.6.150.0100.07718.11
5.6.140.0070.08318.16
5.6.130.0100.07718.18
5.6.120.0100.05020.98
5.6.110.0130.07720.91
5.6.100.0170.06020.99
5.6.90.0130.07020.96
5.6.80.0100.07020.35
5.6.70.4230.03320.38
5.5.350.3870.04020.31
5.5.340.0100.07717.92
5.5.330.0100.03720.06
5.5.320.0200.08020.09
5.5.310.0230.06020.33
5.5.300.0070.05317.88
5.5.290.0000.06718.03
5.5.280.0100.08020.88
5.5.270.0170.07320.64
5.5.260.0070.04020.89
5.5.250.0070.06320.49
5.5.240.0030.04020.15
5.4.450.0070.07719.36
5.4.440.0000.04319.23
5.4.430.0030.03719.40
5.4.420.0000.04019.47
5.4.410.0030.04019.28
5.4.400.0030.03719.13
5.4.390.0030.03719.12
5.4.380.0030.03718.79
5.4.370.0030.04719.14
5.4.360.0030.03719.00
5.4.350.0070.03719.11
5.4.340.0070.03718.81
5.4.320.0030.03719.07
5.4.310.0130.02719.18
5.4.300.0030.03718.91
5.4.290.0070.03318.79
5.4.280.0030.04719.13
5.4.270.0030.07319.15
5.4.260.0100.07019.17
5.4.250.0000.05019.07
5.4.240.0100.04719.14
5.4.230.0000.06319.16
5.4.220.0030.08018.78
5.4.210.0070.07719.07
5.4.200.0170.06319.13
5.4.190.0030.08018.78
5.4.180.0070.07718.78
5.4.170.0000.04318.99
5.4.160.0100.07019.16
5.4.150.0000.04019.11
5.4.140.0030.05716.37
5.4.130.0030.03716.37
5.4.120.0030.07016.38
5.4.110.0070.04716.30
5.4.100.0070.07316.23
5.4.90.0170.06316.60
5.4.80.0170.06016.36
5.4.70.0100.06716.25
5.4.60.0030.05016.38
5.4.50.0030.03716.36
5.4.40.0030.04016.21
5.4.30.0030.05716.38
5.4.20.0100.04016.28
5.4.10.0030.07016.31
5.4.00.0100.06715.86
5.3.290.0030.03714.59
5.3.280.0030.07314.52
5.3.270.0070.03714.53
5.3.260.0030.05014.56
5.3.250.0030.04314.53
5.3.240.0130.03314.58
5.3.230.0030.07014.55
5.3.220.0030.07714.48
5.3.210.0030.07014.48
5.3.200.0030.06714.44
5.3.190.0100.07014.46
5.3.180.0070.07714.50
5.3.170.0000.04014.49
5.3.160.0000.04014.49
5.3.150.0030.04014.51
5.3.140.0030.06014.52
5.3.130.0030.05014.36
5.3.120.0100.03314.36
5.3.110.0030.06314.47
5.3.100.0030.04713.98
5.3.90.0100.07014.03
5.3.80.0030.07013.94
5.3.70.0130.06314.00
5.3.60.0030.06013.86
5.3.50.0030.08013.77
5.3.40.0030.07013.76
5.3.30.0070.03313.73
5.3.20.0130.06713.65
5.3.10.0000.04013.59
5.3.00.0000.07313.73
5.2.170.0070.04311.13
5.2.160.0030.04011.02
5.2.150.0030.04011.22
5.2.140.0070.05711.02
5.2.130.0030.03711.05
5.2.120.0070.04011.25
5.2.110.0100.05710.93
5.2.100.0070.05711.25
5.2.90.0030.05711.18
5.2.80.0030.04010.97
5.2.70.0030.04011.24
5.2.60.0030.06311.01
5.2.50.0030.06710.95
5.2.40.0100.05010.98
5.2.30.0030.04710.90
5.2.20.0000.05010.93
5.2.10.0070.05710.77
5.2.00.0070.02710.77
5.1.60.0000.02710.77
5.1.50.0130.04310.77
5.1.40.0030.04710.77
5.1.30.0000.06010.77
5.1.20.0070.05310.77
5.1.10.0000.04710.77
5.1.00.0030.03710.77
5.0.50.0030.04310.77
5.0.40.0070.03710.77
5.0.30.0000.06310.77
5.0.20.0030.04010.77
5.0.10.0000.04010.77
5.0.00.0070.03010.77
4.4.90.0030.01710.77
4.4.80.0070.03010.77
4.4.70.0000.02010.77
4.4.60.0000.03710.77
4.4.50.0030.01710.77
4.4.40.0030.02310.77
4.4.30.0030.03310.77
4.4.20.0000.03710.77
4.4.10.0030.02710.77
4.4.00.0030.03310.77
4.3.110.0000.02310.77
4.3.100.0000.03310.77
4.3.90.0030.03010.77
4.3.80.0070.03010.77
4.3.70.0030.03710.77
4.3.60.0070.01310.77
4.3.50.0000.03710.77
4.3.40.0000.04310.77
4.3.30.0000.03710.77
4.3.20.0030.03310.77
4.3.10.0030.03710.77
4.3.00.0030.03310.77

preferences:
33.64 ms | 403 KiB | 5 Q