3v4l.org

run code in 300+ PHP versions simultaneously
<?php $address = '5e Dorpsstraat 5-B'; $matchArr = array(); preg_match_all('/(\d+)/', $address, $matchArr); $houseNumber = array_pop($matchArr[0]); // strrpos om problemen te voorkomen bij straatnamen zoals 151th Avenue 151 $houseNumberStartPos = strrpos($address, $houseNumber); $streetName = substr($address, 0, $houseNumberStartPos); // Verwijder whitespace bij correcte notatie, geen -1 op strrpos voor foute notatie. // Voorbeeld Dorpsstraat 12 (correct), Dorpsstraat12 (incorrect). $streetName = trim($streetName); $houseNumberAdd = substr($address, ($houseNumberStartPos + strlen($houseNumber)));

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.0140.00716.72
8.3.50.0090.01122.01
8.3.40.0110.01118.93
8.3.30.0140.00019.13
8.3.20.0000.00720.20
8.3.10.0050.00323.66
8.3.00.0040.00419.04
8.2.180.0120.00316.63
8.2.170.0000.01422.96
8.2.160.0040.01120.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0060.00921.04
8.2.110.0090.00022.29
8.2.100.0110.00020.54
8.2.90.0030.00519.40
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0060.00318.04
8.2.50.0050.00318.07
8.2.40.0040.00420.07
8.2.30.0000.00718.21
8.2.20.0000.00817.72
8.2.10.0080.00018.11
8.2.00.0000.00817.92
8.1.280.0090.00625.92
8.1.270.0060.00323.96
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.01022.14
8.1.230.0070.00419.00
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0100.00017.35
8.1.190.0080.00017.25
8.1.180.0080.00018.10
8.1.170.0030.00518.53
8.1.160.0040.00421.95
8.1.150.0000.00818.65
8.1.140.0070.00017.59
8.1.130.0000.00717.96
8.1.120.0000.00717.57
8.1.110.0040.00417.43
8.1.100.0020.00517.44
8.1.90.0040.00417.56
8.1.80.0040.00417.44
8.1.70.0070.00017.54
8.1.60.0000.00817.56
8.1.50.0030.00517.50
8.1.40.0030.00617.52
8.1.30.0000.00817.73
8.1.20.0040.00417.75
8.1.10.0000.00717.53
8.1.00.0070.00017.47
8.0.300.0040.00418.77
8.0.290.0050.00316.88
8.0.280.0030.00318.52
8.0.270.0030.00317.14
8.0.260.0030.00317.12
8.0.250.0030.00317.05
8.0.240.0030.00317.04
8.0.230.0080.00017.05
8.0.220.0000.00816.97
8.0.210.0030.00317.02
8.0.200.0000.00616.95
8.0.190.0000.00816.91
8.0.180.0070.00017.04
8.0.170.0080.00016.98
8.0.160.0040.00417.02
8.0.150.0050.00216.82
8.0.140.0000.00816.84
8.0.130.0000.00613.45
8.0.120.0040.00416.93
8.0.110.0040.00416.99
8.0.100.0040.00416.84
8.0.90.0030.00316.97
8.0.80.0060.00917.01
8.0.70.0000.00817.10
8.0.60.0000.00816.87
8.0.50.0000.00716.86
8.0.30.0080.01017.28
8.0.20.0110.01017.40
8.0.10.0070.00016.95
8.0.00.0120.00816.80
7.4.330.0060.00015.00
7.4.320.0050.00316.65
7.4.300.0040.00416.79
7.4.290.0040.00416.70
7.4.280.0030.00616.72
7.4.270.0000.00716.61
7.4.260.0070.00016.63
7.4.250.0040.00416.71
7.4.240.0030.00316.74
7.4.230.0040.00416.87
7.4.220.0130.01316.70
7.4.210.0070.00716.63
7.4.200.0040.00416.83
7.4.190.0030.00516.65
7.4.160.0080.00816.80
7.4.150.0060.01017.40
7.4.140.0100.01317.86
7.4.130.0070.01016.84
7.4.120.0140.00316.79
7.4.110.0150.00316.77
7.4.100.0070.01116.87
7.4.90.0120.00816.76
7.4.80.0090.00919.39
7.4.70.0110.00616.57
7.4.60.0090.00916.71
7.4.50.0020.00216.60
7.4.40.0120.00616.86
7.4.30.0140.00316.60
7.4.00.0090.00715.18
7.3.330.0070.00013.17
7.3.320.0000.00613.27
7.3.310.0000.00716.53
7.3.300.0070.00016.40
7.3.290.0110.00316.42
7.3.280.0100.00816.47
7.3.270.0120.00417.40
7.3.260.0140.01016.42
7.3.250.0090.00816.77
7.3.240.0190.00316.38
7.3.230.0070.01416.61
7.3.210.0130.00316.60
7.3.200.0130.00919.39
7.3.190.0110.01116.62
7.3.180.0140.00316.57
7.3.170.0090.00616.46
7.3.160.0090.01316.40
7.3.120.0060.00915.02
7.3.110.0070.01014.68
7.3.100.0040.01114.97
7.3.90.0060.01014.89
7.3.80.0000.01615.15
7.3.70.0100.00315.10
7.3.60.0030.00915.05
7.3.50.0000.01414.95
7.3.40.0080.00414.59
7.3.30.0030.00915.03
7.3.20.0080.00816.77
7.3.10.0040.00916.67
7.3.00.0080.00816.75
7.2.330.0100.01016.64
7.2.320.0030.01616.77
7.2.310.0060.01216.78
7.2.300.0160.00616.76
7.2.290.0030.01416.73
7.2.250.0090.00615.14
7.2.240.0090.00915.37
7.2.230.0060.00915.10
7.2.220.0080.00415.37
7.2.210.0040.01514.82
7.2.200.0040.01415.03
7.2.190.0070.00715.06
7.2.180.0050.00514.84
7.2.170.0100.00014.98
7.2.130.0060.00617.06
7.2.120.0090.00316.99
7.2.110.0090.00617.06
7.2.100.0040.01116.95
7.2.90.0000.01217.27
7.2.80.0060.00917.27
7.2.70.0070.00417.17
7.2.60.0110.00717.14
7.2.50.0030.01016.97
7.2.40.0100.00717.08
7.2.30.0080.00017.11
7.2.20.0090.00617.04
7.2.10.0030.00617.03
7.2.00.0070.01016.95
7.1.330.0000.01415.59
7.1.320.0000.00815.75
7.1.310.0070.00415.87
7.1.300.0050.00515.86
7.1.290.0040.00816.04
7.1.280.0040.00715.88
7.1.270.0000.01516.16
7.1.260.0000.01015.96
7.1.250.0060.00615.94
7.1.70.0040.00417.03
7.1.60.0150.01119.70
7.1.50.0170.01017.13
7.1.00.0070.07322.50
7.0.200.0040.00416.95
7.0.140.0000.07722.04
7.0.60.0130.04319.83
7.0.50.0130.06717.89
7.0.40.0070.04320.14
7.0.30.0200.05020.18
7.0.20.0170.04720.05
7.0.10.0070.05020.24
7.0.00.0030.04320.13
5.6.280.0070.07021.09
5.6.210.0100.08020.54
5.6.200.0070.04018.15
5.6.190.0000.05020.67
5.6.180.0200.05320.35
5.6.170.0200.05020.51
5.6.160.0070.08720.61
5.6.150.0070.08318.13
5.6.140.0030.08018.07
5.6.130.0100.04318.11
5.6.120.0100.08020.98
5.6.110.0370.06020.99
5.6.100.0030.07720.96
5.6.90.0070.06020.99
5.6.80.0030.06320.52
5.6.70.2470.06020.36
5.5.350.0100.08020.38
5.5.340.0030.04018.01
5.5.330.0000.04720.20
5.5.320.4030.03320.14
5.5.310.0230.06720.17
5.5.300.0100.08017.88
5.5.290.0000.08717.98
5.5.280.0070.06320.89
5.5.270.0070.04720.95
5.5.260.0070.06320.86
5.5.250.0170.07020.70
5.5.240.0170.04320.03
5.4.450.0200.03719.24
5.4.440.1230.05019.39
5.4.430.0330.04319.54
5.4.420.0430.04019.49
5.4.410.0130.04719.30
5.4.400.0200.04019.25
5.4.390.0300.05019.16
5.4.380.0230.05318.57
5.4.370.0230.06318.57
5.4.360.0500.04718.68
5.4.350.0430.06718.59
5.4.340.0230.06318.53
5.4.320.0060.03512.45
5.4.310.0070.04312.45
5.4.300.0070.05712.45
5.4.290.0130.04912.45
5.4.280.0080.04012.34
5.4.270.0070.03912.34
5.4.260.0070.03812.34
5.4.250.0040.04312.34
5.4.240.0100.03612.35
5.4.230.0040.04612.34
5.4.220.0080.04112.34
5.4.210.0100.04012.34
5.4.200.0060.05112.34
5.4.190.0070.05312.33
5.4.180.0110.04912.33
5.4.170.0070.05312.34
5.4.160.0090.04812.34
5.4.150.0160.04312.34
5.4.140.0140.04612.02
5.4.130.0070.04912.01
5.4.120.0080.05111.97
5.4.110.0140.04511.96
5.4.100.0120.04411.96
5.4.90.0080.05211.96
5.4.80.0110.05111.96
5.4.70.0070.04411.96
5.4.60.0080.04211.96
5.4.50.0070.03911.96
5.4.40.0060.03811.95
5.4.30.0060.04411.95
5.4.20.0070.03911.95
5.4.10.0030.04211.95
5.4.00.0080.03711.43
5.3.290.0060.03912.80
5.3.280.0070.04012.70
5.3.270.0090.04612.73
5.3.260.0050.05512.72
5.3.250.0090.04112.72
5.3.240.0100.04212.72
5.3.230.0070.04312.71
5.3.220.0090.03812.68
5.3.210.0090.04012.68
5.3.200.0060.04312.68
5.3.190.0090.04412.68
5.3.180.0060.03912.67
5.3.170.0070.03912.67
5.3.160.0120.03512.68
5.3.150.0060.04512.68
5.3.140.0100.04112.66
5.3.130.0160.07012.66
5.3.120.0070.04212.66
5.3.110.0090.04512.66
5.3.100.0120.04512.11
5.3.90.0130.05012.09
5.3.80.0050.04112.07
5.3.70.0180.03912.07
5.3.60.0180.06012.06
5.3.50.0130.04312.00
5.3.40.0080.04612.00
5.3.30.0060.04611.94
5.3.20.0130.03611.72
5.3.10.0030.04311.69
5.3.00.0080.04411.68
5.2.170.0090.0389.18
5.2.160.0090.0359.18
5.2.150.0060.0439.17
5.2.140.0050.0419.18
5.2.130.0080.0359.14
5.2.120.0050.0339.13
5.2.110.0060.0299.14
5.2.100.0080.0289.14
5.2.90.0040.0329.14
5.2.80.0050.0339.13
5.2.70.0090.0279.13
5.2.60.0070.0329.09
5.2.50.0040.0369.05
5.2.40.0040.0359.04
5.2.30.0080.0399.02
5.2.20.0050.0409.01
5.2.10.0090.0358.92
5.2.00.0080.0388.78
5.1.60.0060.0318.06
5.1.50.0030.0358.06
5.1.40.0100.0278.04
5.1.30.0080.0338.39
5.1.20.0080.0348.41
5.1.10.0080.0328.14
5.1.00.0090.0328.14
5.0.50.0050.0276.62
5.0.40.0050.0266.48
5.0.30.0040.0386.29
5.0.20.0070.0186.26
5.0.10.0060.0216.24
5.0.00.0020.0346.23
4.4.90.0040.0164.78
4.4.80.0040.0164.75
4.4.70.0020.0184.75
4.4.60.0050.0144.76
4.4.50.0000.0194.77
4.4.40.0040.0264.71
4.4.30.0020.0174.76
4.4.20.0020.0184.84
4.4.10.0070.0134.85
4.4.00.0030.0274.76
4.3.110.0050.0154.67
4.3.100.0050.0154.67
4.3.90.0040.0164.64
4.3.80.0020.0264.59
4.3.70.0030.0174.63
4.3.60.0030.0154.63
4.3.50.0020.0184.63
4.3.40.0020.0254.54
4.3.30.0060.0123.28
4.3.20.0020.0173.26
4.3.10.0020.0183.22
4.3.00.0030.01716.93

preferences:
52.59 ms | 401 KiB | 5 Q