3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string='دد'; echo preg_replace('#(?:^[^\pL]*)|(?:[^\pL]*$)#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.10.0060.00317.98
8.3.140.0040.00416.85
8.3.130.0080.00018.64
8.3.120.0040.00418.82
8.3.110.0060.00320.94
8.3.100.0130.00316.95
8.3.90.0110.00426.77
8.3.80.0000.00919.36
8.3.70.0060.00916.63
8.3.60.0090.00616.75
8.3.50.0120.00521.27
8.3.40.0110.00418.95
8.3.30.0120.00319.09
8.3.20.0040.00420.38
8.3.10.0080.00023.70
8.3.00.0080.00019.51
8.2.250.0080.00016.69
8.2.240.0120.00917.08
8.2.230.0040.00422.58
8.2.220.0000.00916.93
8.2.210.0060.00626.77
8.2.200.0080.00018.88
8.2.190.0070.00717.00
8.2.180.0150.00018.54
8.2.170.0140.00022.96
8.2.160.0130.00719.21
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00021.31
8.2.110.0000.01021.07
8.2.100.0060.00618.09
8.2.90.0040.00419.52
8.2.80.0080.00019.17
8.2.70.0080.00017.75
8.2.60.0030.00617.75
8.2.50.0050.00318.22
8.2.40.0050.00317.95
8.2.30.0020.00518.16
8.2.20.0040.00417.99
8.2.10.0050.00318.07
8.2.00.0070.00317.89
8.1.300.0060.01018.04
8.1.290.0070.00430.84
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0090.00328.09
8.1.240.0060.00322.19
8.1.230.0060.00621.01
8.1.220.0050.00317.78
8.1.210.0050.00318.87
8.1.200.0000.00917.25
8.1.190.0000.00817.35
8.1.180.0060.00318.10
8.1.170.0040.00418.67
8.1.160.0000.00821.96
8.1.150.0040.00418.79
8.1.140.0000.00817.61
8.1.130.0030.00317.92
8.1.120.0050.00217.44
8.1.110.0030.00517.61
8.1.100.0000.00717.55
8.1.90.0070.00017.59
8.1.80.0040.00417.45
8.1.70.0000.00717.53
8.1.60.0040.00417.69
8.1.50.0040.00417.47
8.1.40.0040.00417.56
8.1.30.0060.00317.55
8.1.20.0040.00417.72
8.1.10.0030.00517.60
8.1.00.0040.00417.55
8.0.300.0000.00719.97
8.0.290.0040.00417.00
8.0.280.0070.00018.37
8.0.270.0000.00716.94
8.0.260.0070.00017.15
8.0.250.0070.00017.15
8.0.240.0000.00717.22
8.0.230.0030.00317.09
8.0.220.0040.00417.11
8.0.210.0000.00717.13
8.0.200.0030.00317.13
8.0.190.0060.00317.14
8.0.180.0030.00516.97
8.0.170.0000.00817.08
8.0.160.0000.00717.21
8.0.150.0080.00017.09
8.0.140.0060.00116.96
8.0.130.0050.00215.22
8.0.120.0040.00417.13
8.0.110.0050.00217.00
8.0.100.0010.00616.95
8.0.90.0040.00317.07
8.0.80.0090.00317.08
8.0.70.0020.00517.05
8.0.60.0040.00416.99
8.0.50.0030.00417.02
8.0.30.0040.01117.11
8.0.20.0090.00517.30
8.0.10.0050.00517.06
8.0.00.0100.00716.94
7.4.330.0060.00418.01
7.4.320.0050.00316.77
7.4.300.0000.00616.70
7.4.290.0030.00316.78
7.4.280.0040.00716.71
7.4.270.0060.00116.75
7.4.260.0020.00516.66
7.4.250.0020.00616.75
7.4.240.0020.00516.65
7.4.230.0030.00316.85
7.4.220.0030.00916.77
7.4.210.0080.00816.80
7.4.200.0060.00516.76
7.4.190.0040.00416.58
7.4.180.0000.01016.80
7.4.160.0100.00416.68
7.4.150.0040.00917.06
7.4.140.0090.00717.45
7.4.130.0090.00716.71
7.4.120.0060.01016.66
7.4.110.0070.00516.68
7.4.100.0050.00816.62
7.4.90.0020.01216.77
7.4.80.0080.00618.04
7.4.70.0090.00616.65
7.4.60.0060.00916.62
7.4.50.0050.00116.67
7.4.40.0050.00419.72
7.4.30.0030.01016.61
7.4.20.0040.00416.63
7.4.10.0080.00516.60
7.4.00.0060.00716.05
7.3.330.0070.00614.80
7.3.320.0050.00814.77
7.3.310.0130.00116.28
7.3.300.0070.00716.19
7.3.290.0120.00616.41
7.3.280.0110.00816.38
7.3.270.0160.00516.91
7.3.260.0100.00816.38
7.3.250.0080.01316.56
7.3.240.0160.00716.27
7.3.230.0130.00716.41
7.3.220.0310.00016.34
7.3.210.0080.01016.53
7.3.200.0160.00517.87
7.3.190.0100.00916.51
7.3.180.0140.00416.34
7.3.170.0110.00616.24
7.3.160.0100.00816.48
7.3.150.0100.01016.38
7.3.140.0100.01016.23
7.3.130.0120.00716.48
7.3.120.0120.00516.01
7.3.110.0110.00616.46
7.3.100.0090.00816.40
7.3.90.0120.00516.38
7.3.80.0110.00416.23
7.3.70.0110.00716.34
7.3.60.0110.00516.46
7.3.50.0120.00716.59
7.3.40.0110.00516.48
7.3.30.0150.00416.33
7.3.20.0140.00318.26
7.3.10.0070.00917.58
7.3.00.0070.00717.61
7.2.340.0150.00316.60
7.2.330.0170.00116.55
7.2.320.0100.00816.53
7.2.310.0140.00616.63
7.2.300.0100.00716.43
7.2.290.0120.00616.65
7.2.280.0160.00216.28
7.2.270.0120.00716.59
7.2.260.0120.00716.41
7.2.250.0090.01116.49
7.2.240.0100.00916.57
7.2.230.0080.00916.47
7.2.220.0110.00516.55
7.2.210.0130.00316.57
7.2.200.0110.00716.52
7.2.190.0090.00916.66
7.2.180.0130.00316.63
7.2.170.0130.00516.52
7.2.160.0120.00516.73
7.2.150.0110.00618.47
7.2.140.0110.00618.55
7.2.130.0090.00717.72
7.2.120.0090.00617.74
7.2.110.0100.00817.67
7.2.100.0080.00917.69
7.2.90.0110.00617.58
7.2.80.0060.01117.66
7.2.70.0120.00517.76
7.2.60.0070.00917.49
7.2.50.0070.00817.70
7.2.40.0070.00817.63
7.2.30.0110.00417.71
7.2.20.0100.00817.67
7.2.10.0080.00617.62
7.2.00.0050.00818.07
7.1.330.0110.00217.50
7.1.320.0120.00417.47
7.1.310.0130.00417.51
7.1.300.0070.00917.52
7.1.290.0080.01017.53
7.1.280.0090.00817.43
7.1.270.0100.00817.49
7.1.260.0130.00217.31
7.1.250.0080.00716.68
7.1.240.0120.00517.37
7.1.230.0100.00617.42
7.1.220.0110.00617.34
7.1.210.0100.00617.39
7.1.200.0080.00616.84
7.1.190.0120.00617.34
7.1.180.0080.00917.33
7.1.170.0090.00617.30
7.1.160.0120.00517.31
7.1.150.0080.00617.23
7.1.140.0140.00317.23
7.1.130.0060.00917.40
7.1.120.0130.00517.40
7.1.110.0050.01217.52
7.1.100.0120.00417.59
7.1.90.0080.00917.29
7.1.80.0120.00317.54
7.1.70.0090.00717.26
7.1.60.0090.01018.03
7.1.50.0180.00423.30
7.1.40.0120.00517.47
7.1.30.0070.01017.51
7.1.20.0080.00917.48
7.1.10.0080.00817.49
7.1.00.0070.03119.02
7.0.330.0100.00417.10
7.0.320.0110.00117.13
7.0.310.0060.00917.17
7.0.300.0060.00917.09
7.0.290.0090.00717.13
7.0.280.0100.00616.94
7.0.270.0120.00616.99
7.0.260.0150.00217.02
7.0.250.0100.00517.27
7.0.240.0130.00317.13
7.0.230.0120.00317.06
7.0.220.0120.00317.16
7.0.210.0090.00516.96
7.0.200.0120.00616.43
7.0.190.0090.00917.06
7.0.180.0090.00717.29
7.0.170.0080.00617.04
7.0.160.0060.01017.05
7.0.150.0100.00516.92
7.0.140.0080.02718.74
7.0.130.0100.00517.10
7.0.120.0120.00316.98
7.0.110.0090.00717.10
7.0.100.0080.00717.14
7.0.90.0100.00617.16
7.0.80.0110.00517.18
7.0.70.0060.02018.55
7.0.60.0050.03518.52
7.0.50.0060.03118.71
7.0.40.0120.02817.27
7.0.30.0050.03417.35
7.0.20.0080.03017.37
7.0.10.0080.03117.47
7.0.00.0050.03317.33
5.6.400.0060.01015.71
5.6.390.0070.00815.65
5.6.380.0040.01315.64
5.6.370.0090.00715.60
5.6.360.0080.00815.71
5.6.350.0110.00515.78
5.6.340.0080.00815.73
5.6.330.0060.00815.92
5.6.320.0100.00615.68
5.6.310.0030.01115.75
5.6.300.0110.00515.80
5.6.290.0110.00415.85
5.6.280.0110.02417.51
5.6.270.0090.00715.77
5.6.260.0050.01015.63
5.6.250.0080.00915.81
5.6.240.0070.00915.63
5.6.230.0120.00515.82
5.6.220.0100.03117.42
5.6.210.0100.02517.33
5.6.200.0110.03017.48
5.6.190.0100.02317.52
5.6.180.0090.03017.49
5.6.170.0060.03317.55
5.6.160.0140.02717.55
5.6.150.0070.02617.51
5.6.140.0070.02917.61
5.6.130.0080.02917.50
5.6.120.0100.01617.62
5.6.110.0080.02217.61
5.6.100.0090.02517.46
5.6.90.0090.02317.49
5.6.80.0080.02317.14
5.6.70.0110.01817.29
5.6.60.0090.01717.18
5.6.50.0060.02717.24
5.6.40.0050.02117.29
5.6.30.0080.01917.32
5.6.20.0080.02117.24
5.6.10.0100.02117.22
5.6.00.0100.02017.26
5.5.380.0110.00615.94
5.5.370.0090.00815.65
5.5.360.0070.03517.25
5.5.350.0070.03017.27
5.5.340.0120.02817.45
5.5.330.0080.03217.42
5.5.320.0090.03217.47
5.5.310.0110.02417.52
5.5.300.0090.02217.30
5.5.290.0100.03017.40
5.5.280.0110.02217.51
5.5.270.0060.02417.35
5.5.260.0090.02417.44
5.5.250.0090.02417.32
5.5.240.0050.02717.14
5.5.230.0060.02117.19
5.5.220.0050.02617.11
5.5.210.0050.02417.15
5.5.200.0080.02317.08
5.5.190.0070.02717.24
5.5.180.0050.03217.14
5.5.170.0080.01515.72
5.5.160.0060.02517.18
5.5.150.0070.02417.14
5.5.140.0090.01817.16
5.5.130.0050.02417.12
5.5.120.0100.01921.46
5.5.110.0070.02217.09
5.5.100.0090.01817.05
5.5.90.0090.02017.04
5.5.80.0050.02317.14
5.5.70.0100.02017.08
5.5.60.0080.02217.10
5.5.50.0090.02017.20
5.5.40.0090.01917.12
5.5.30.0110.01817.09
5.5.20.0070.02317.05
5.5.10.0060.02517.12
5.5.00.0080.02016.99
5.4.450.0070.04515.87
5.4.440.0030.03015.97
5.4.430.0040.03715.97
5.4.420.0070.03215.71
5.4.410.0040.02615.80
5.4.400.0100.01815.50
5.4.390.0090.01815.71
5.4.380.0070.02415.72
5.4.370.0080.04615.64
5.4.360.0080.02515.71
5.4.350.0060.02915.61
5.4.340.0040.02315.64
5.4.330.0090.00912.43
5.4.320.0060.02115.52
5.4.310.0070.02015.71
5.4.300.0060.02115.55
5.4.290.0030.02415.65
5.4.280.0100.02315.62
5.4.270.0090.02315.71
5.4.260.0060.02115.60
5.4.250.0080.01915.72
5.4.240.0090.02115.63
5.4.230.0050.02015.61
5.4.220.0050.02415.56
5.4.210.0070.02015.58
5.4.200.0050.02315.38
5.4.190.0020.02315.47
5.4.180.0090.02515.55
5.4.170.0070.02115.54
5.4.160.0040.02615.60
5.4.150.0060.02315.63
5.4.140.0070.03314.29
5.4.130.0060.04314.24
5.4.120.0080.01914.25
5.4.110.0040.04414.31
5.4.100.0040.02814.35
5.4.90.0030.03014.35
5.4.80.0090.02914.32
5.4.70.0070.03014.31
5.4.60.0100.02514.45
5.4.50.0050.05114.39
5.4.40.0090.04414.31
5.4.30.0080.04114.40
5.4.20.0100.03514.27
5.4.10.0040.04714.29
5.4.00.0080.04513.91
5.3.290.0040.02813.86
5.3.280.0040.02813.83
5.3.270.0060.02713.77
5.3.260.0090.03313.81
5.3.250.0070.04213.87
5.3.240.0080.02613.64
5.3.230.0120.05113.79
5.3.220.0080.04713.78
5.3.210.0100.04713.71
5.3.200.0070.04013.64
5.3.190.0080.03913.84
5.3.180.0070.04913.70
5.3.170.0080.04613.84
5.3.160.0050.02913.79
5.3.150.0100.04113.67
5.3.140.0050.03913.75
5.3.130.0090.04613.73
5.3.120.0040.05513.82
5.3.110.0050.04813.79
5.3.100.0060.04913.36
5.3.90.0060.02813.34
5.3.80.0050.04913.32
5.3.70.0050.03813.29
5.3.60.0060.03313.47
5.3.50.0080.04013.20
5.3.40.0100.03213.26
5.3.30.0060.03913.27
5.3.20.0050.03813.19
5.3.10.0060.03513.02
5.3.00.0080.03713.20

preferences:
32.55 ms | 403 KiB | 5 Q