3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = '5e Dorpsstraat 41B'; $matchArr = array(); preg_match('/(\d+?)/', $address, $matchArr); var_dump($matchArr); $number = array_pop($matchArr); $split = explode($number, $address); $lastPart = $number . array_pop($split); $firstPart = implode($number, $split); print 'First part: ' . $firstPart . "\n"; print 'Last part: ' . $lastPart . "\n";

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.0070.00716.88
8.3.50.0080.00922.13
8.3.40.0140.00019.02
8.3.30.0140.00019.07
8.3.20.0040.00420.34
8.3.10.0080.00023.66
8.3.00.0080.00019.02
8.2.180.0100.00716.63
8.2.170.0120.00318.81
8.2.160.0140.00722.96
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00720.88
8.2.110.0090.00022.38
8.2.100.0080.00317.84
8.2.90.0090.00019.15
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0080.00018.11
8.2.30.0040.00418.17
8.2.20.0000.00817.71
8.2.10.0020.00518.02
8.2.00.0000.00817.89
8.1.280.0140.00725.92
8.1.270.0050.00324.05
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00423.84
8.1.230.0040.00819.23
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0000.01017.48
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0000.00818.62
8.1.160.0070.00021.89
8.1.150.0000.00718.70
8.1.140.0060.00317.61
8.1.130.0040.00417.51
8.1.120.0050.00317.61
8.1.110.0000.00717.59
8.1.100.0000.00717.59
8.1.90.0040.00417.61
8.1.80.0040.00417.50
8.1.70.0030.00317.59
8.1.60.0000.00817.65
8.1.50.0050.00217.65
8.1.40.0030.00717.58
8.1.30.0040.00417.70
8.1.20.0000.00817.68
8.1.10.0040.00417.58
8.1.00.0000.00717.57
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0040.00418.38
8.0.270.0030.00317.29
8.0.260.0000.00616.84
8.0.250.0050.00417.09
8.0.240.0000.00717.09
8.0.230.0070.00017.00
8.0.220.0030.00316.90
8.0.210.0030.00317.05
8.0.200.0040.00417.01
8.0.190.0000.00717.11
8.0.180.0040.00416.94
8.0.170.0030.00517.09
8.0.160.0020.00517.01
8.0.150.0050.00216.86
8.0.140.0000.00817.03
8.0.130.0030.00313.50
8.0.120.0040.00417.04
8.0.110.0040.00416.94
8.0.100.0040.00416.93
8.0.90.0040.00416.93
8.0.80.0100.01017.01
8.0.70.0040.00416.93
8.0.60.0070.00016.95
8.0.50.0000.00716.89
8.0.30.0130.00617.28
8.0.20.0090.01117.40
8.0.10.0040.00417.13
8.0.00.0170.00516.97
7.4.330.0060.00015.00
7.4.320.0030.00316.77
7.4.300.0000.00716.78
7.4.290.0060.00016.67
7.4.280.0030.00616.68
7.4.270.0000.00716.68
7.4.260.0050.00216.69
7.4.250.0030.00516.67
7.4.240.0070.00016.61
7.4.230.0000.00716.49
7.4.220.0140.01316.78
7.4.210.0090.00916.73
7.4.200.0000.00716.54
7.4.190.0040.00416.82
7.4.160.0070.01016.90
7.4.150.0180.00017.40
7.4.140.0130.00717.86
7.4.130.0100.01016.61
7.4.120.0070.01116.66
7.4.110.0060.01216.66
7.4.100.0070.01116.71
7.4.90.0080.00916.75
7.4.80.0100.01019.39
7.4.70.0100.00716.59
7.4.60.0060.01016.51
7.4.50.0000.00616.70
7.4.40.0080.00816.63
7.4.30.0030.01316.57
7.4.00.0120.00615.12
7.3.330.0060.00313.24
7.3.320.0020.00213.41
7.3.310.0050.00316.25
7.3.300.0000.00716.41
7.3.290.0070.01016.38
7.3.280.0100.00716.39
7.3.270.0030.01417.40
7.3.260.0070.01116.51
7.3.250.0150.00816.57
7.3.240.0040.01316.76
7.3.230.0160.00716.69
7.3.210.0170.00016.48
7.3.200.0080.01419.39
7.3.190.0030.01516.43
7.3.180.0030.01416.46
7.3.170.0130.01016.40
7.3.160.0000.01716.39
7.3.120.0090.00614.66
7.2.330.0130.00316.64
7.2.320.0070.01116.58
7.2.310.0100.01316.82
7.2.300.0000.01716.94
7.2.290.0060.01116.72
7.2.60.0000.01217.24
7.1.200.0000.01516.01
7.1.70.0030.00617.30
7.1.60.0120.01219.70
7.1.50.0240.01434.96
7.1.00.0130.06722.32
7.0.200.0040.00716.83
7.0.140.0130.06322.04
7.0.60.0070.03720.05
7.0.50.0030.08017.70
7.0.40.0030.09020.30
7.0.30.0400.06320.11
7.0.20.0270.07720.35
7.0.10.0070.04020.36
7.0.00.0100.07720.05
5.6.280.0070.06721.07
5.6.210.0030.05720.46
5.6.200.0030.06018.13
5.6.190.0000.05020.27
5.6.180.0270.08020.77
5.6.170.0130.08720.49
5.6.160.0130.03720.41
5.6.150.0070.08018.20
5.6.140.0130.08018.20
5.6.130.0000.05718.21
5.6.120.0030.05720.98
5.6.110.0070.08321.04
5.6.100.0030.04321.10
5.6.90.0030.09020.96
5.6.80.0100.08320.50
5.5.350.0230.07720.43
5.5.340.0130.07317.98
5.5.330.0100.03720.21
5.5.320.0330.03320.29
5.5.310.0270.08020.29
5.5.300.0070.08017.90
5.5.290.0170.07317.98
5.5.280.0030.04320.84
5.5.270.0000.04320.75
5.5.260.0070.07020.79
5.5.250.0030.08320.57
5.5.240.0000.04020.23
5.4.450.0330.04319.42
5.4.440.0400.04719.46
5.4.430.0230.04719.39
5.4.420.0070.04319.11
5.4.410.0430.04719.41
5.4.400.0230.02719.10
5.4.390.0200.04719.06
5.4.380.0170.06318.50
5.4.370.0330.06718.67
5.4.360.0300.05318.77
5.4.350.0230.06318.51
5.4.340.0370.04718.58
5.4.320.0060.03612.45
5.4.310.0090.03512.45
5.4.300.0130.04812.45
5.4.290.0080.04412.45
5.4.280.0080.04112.35
5.4.270.0080.04212.35
5.4.260.0120.04912.34
5.4.250.0160.06512.35
5.4.240.0240.07312.34
5.4.230.0110.05912.34
5.4.220.0150.05912.34
5.4.210.0080.05512.34
5.4.200.0150.03912.34
5.4.190.0060.04212.34
5.4.180.0050.04612.33
5.4.170.0100.04212.34
5.4.160.0050.04312.34
5.4.150.0080.04212.34
5.4.140.0140.06212.02
5.4.130.0050.04212.01
5.4.120.0070.04311.97
5.4.110.0060.04111.96
5.4.100.0120.05911.96
5.4.90.0120.05311.96
5.4.80.0120.06411.96
5.4.70.0120.05611.96
5.4.60.0070.05011.96
5.4.50.0070.04211.96
5.4.40.0090.03911.95
5.4.30.0130.06411.95
5.4.20.0170.06111.95
5.4.10.0100.03611.95
5.4.00.0070.04611.44
5.3.290.0050.03912.80
5.3.280.0080.04212.71
5.3.270.0070.04512.72
5.3.260.0110.03812.71
5.3.250.0130.05012.72
5.3.240.0110.05412.72
5.3.230.0120.05812.71
5.3.220.0120.05212.68
5.3.210.0130.05312.68
5.3.200.0100.06712.68
5.3.190.0110.06012.68
5.3.180.0080.05912.67
5.3.170.0210.09012.67
5.3.160.0140.08512.67
5.3.150.0140.08012.67
5.3.140.0130.05312.66
5.3.130.0090.04912.66
5.3.120.0150.06612.66
5.3.110.0100.05912.66
5.3.100.0190.08712.11
5.3.90.0110.05812.09
5.3.80.0120.06912.07
5.3.70.0140.07512.07
5.3.60.0090.04012.07
5.3.50.0080.04012.00
5.3.40.0170.06912.00
5.3.30.0090.05311.94
5.3.20.0090.05011.72
5.3.10.0060.04011.69
5.3.00.0070.04311.68
5.2.170.0080.0479.18
5.2.160.0050.0359.18
5.2.150.0080.0429.18
5.2.140.0060.0459.18
5.2.130.0060.0419.13
5.2.120.0080.0369.13
5.2.110.0070.0559.14
5.2.100.0070.0579.14
5.2.90.0130.0709.14
5.2.80.0100.0489.13
5.2.70.0070.0389.13
5.2.60.0080.0359.09
5.2.50.0060.0369.06
5.2.40.0110.0389.04
5.2.30.0040.0329.02
5.2.20.0090.0359.01
5.2.10.0060.0288.92
5.2.00.0070.0288.78
5.1.60.0020.0278.06
5.1.50.0010.0308.05
5.1.40.0040.0328.04
5.1.30.0240.0678.39
5.1.20.0100.0418.41
5.1.10.0030.0378.14
5.1.00.0060.0328.14
5.0.50.0130.0326.62
5.0.40.0120.0496.48
5.0.30.0100.0436.29
5.0.20.0060.0266.26
5.0.10.0020.0236.23
5.0.00.0080.0286.23
4.4.90.0050.0174.77
4.4.80.0050.0164.75
4.4.70.0050.0154.76
4.4.60.0100.0254.75
4.4.50.0040.0244.77
4.4.40.0100.0434.71
4.4.30.0040.0204.76
4.4.20.0020.0184.84
4.4.10.0040.0284.84
4.4.00.0040.0314.76
4.3.110.0050.0164.67
4.3.100.0070.0154.66
4.3.90.0050.0274.64
4.3.80.0030.0274.58
4.3.70.0030.0154.63
4.3.60.0040.0194.63
4.3.50.0070.0424.63
4.3.40.0080.0564.54
4.3.30.0030.0233.29
4.3.20.0080.0193.26
4.3.10.0090.0143.21
4.3.00.0030.01716.93

preferences:
60.03 ms | 401 KiB | 5 Q