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))); print $streetName . "\n"; print $houseNumber . "\n; print $houseNumberAdd;

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)
5.4.300.0070.03319.13
5.4.290.0070.03319.19
5.4.280.0030.03718.88
5.4.270.0000.03719.08
5.4.260.0130.02719.16
5.4.250.0000.03719.09
5.4.240.0030.03719.11
5.4.230.0030.03318.88
5.4.220.0000.04019.18
5.4.210.0000.04019.16
5.4.200.0000.03719.16
5.4.190.0030.03319.05
5.4.180.0070.03319.05
5.4.170.0030.03719.05
5.4.160.0000.03719.06
5.4.150.0030.03719.23
5.4.140.0030.04016.54
5.4.130.0030.03316.34
5.4.120.0030.04316.26
5.4.110.0000.03716.30
5.4.100.0030.03316.46
5.4.90.0030.03716.30
5.4.80.0000.03716.39
5.4.70.0000.03316.38
5.4.60.0000.03316.43
5.4.50.0070.03016.41
5.4.40.0030.03316.36
5.4.30.0000.04016.47
5.4.20.0030.03716.43
5.4.10.0000.03716.36
5.4.00.0030.03315.60
5.3.280.0000.04714.45
5.3.270.0070.03714.49
5.3.260.0130.02714.66
5.3.250.0030.03314.47
5.3.240.0000.04314.57
5.3.230.0030.03314.45
5.3.220.0030.03314.45
5.3.210.0000.03714.45
5.3.200.0030.03314.59
5.3.190.0000.03714.41
5.3.180.0000.04014.52
5.3.170.0030.03714.43
5.3.160.0000.03714.45
5.3.150.0100.03014.50
5.3.140.0000.04014.49
5.3.130.0030.07314.41
5.3.120.0000.03714.43
5.3.110.0030.03714.43
5.3.100.0070.03314.13
5.3.90.0000.03714.00
5.3.80.0030.03313.93
5.3.70.0030.05313.93
5.3.60.0000.03713.84
5.3.50.0000.05313.82
5.3.40.0030.03713.99
5.3.30.0030.04013.72
5.3.20.0130.03713.78
5.3.10.0070.03713.43
5.3.00.0070.03713.47

preferences:
136.86 ms | 1394 KiB | 7 Q