3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = "3000,MELBOURNE 3001,MELBOURNE 3002,EAST MELBOURNE 3003,WEST MELBOURNE 3603,WEST SYDNEY 3103,NORTH PERTH"; $rows = explode(PHP_EOL, $txt); $arr= []; foreach($rows as $row){ List($postcode, $suburb) = explode(",", $row); If(in_array(substr($suburb,0,4), array("EAST", "WEST")) || in_array(substr($suburb,0,5), array("SOUTH", "NORTH"))){ $temp = explode(" ", $suburb); $arr[$temp[1]][$temp[0]][] = $postcode; }else{ $arr[$suburb][] = $postcode; } } Var_dump($arr);

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.70.0100.01016.88
8.3.60.0130.00316.49
8.3.50.0200.00517.47
8.3.40.0060.01218.83
8.3.30.0070.00718.77
8.3.20.0060.00320.33
8.3.10.0080.00021.08
8.3.00.0040.00420.16
8.2.190.0000.01516.58
8.2.180.0190.00318.16
8.2.170.0120.00322.96
8.2.160.0100.00319.46
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0150.00421.04
8.2.110.0060.00320.39
8.2.100.0090.00317.97
8.2.90.0000.00819.20
8.2.80.0060.00617.97
8.2.70.0040.00417.75
8.2.60.0060.00318.04
8.2.50.0050.00318.07
8.2.40.0000.00919.88
8.2.30.0040.00417.98
8.2.20.0040.00418.16
8.2.10.0040.00418.02
8.2.00.0040.00418.11
8.1.280.0070.01025.92
8.1.270.0080.00022.05
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0140.00017.11
8.1.230.0060.00617.82
8.1.220.0080.00017.76
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0040.00418.38
8.1.160.0060.00318.79
8.1.150.0040.00420.31
8.1.140.0110.00019.56
8.1.130.0050.00217.36
8.1.120.0000.00717.42
8.1.110.0040.00417.30
8.1.100.0070.00017.43
8.1.90.0050.00317.30
8.1.80.0040.00417.34
8.1.70.0070.00017.37
8.1.60.0080.00017.61
8.1.50.0030.00717.54
8.1.40.0000.00817.50
8.1.30.0080.00017.54
8.1.20.0080.00017.64
8.1.10.0000.00717.59
8.1.00.0110.00017.46
8.0.300.0030.00620.00
8.0.290.0060.00316.63
8.0.280.0070.00018.44
8.0.270.0030.00317.12
8.0.260.0060.00316.81
8.0.250.0000.00716.82
8.0.240.0070.00016.88
8.0.230.0020.00516.95
8.0.220.0030.00516.82
8.0.210.0080.00016.87
8.0.200.0000.00716.80
8.0.190.0040.00416.91
8.0.180.0040.00416.76
8.0.170.0030.00416.83
8.0.160.0030.00516.84
8.0.150.0000.00716.82
8.0.140.0000.00716.87
8.0.130.0050.00013.25
8.0.120.0030.00516.86
8.0.110.0030.00316.70
8.0.100.0040.00416.92
8.0.90.0040.00416.72
8.0.80.0060.00916.95
8.0.70.0040.00416.75
8.0.60.0040.00416.73
8.0.50.0040.00416.72
8.0.30.0100.01217.11
8.0.20.0110.01017.40
8.0.10.0000.00716.78
8.0.00.0100.00716.53
7.4.330.0040.00015.55
7.4.320.0030.00316.50
7.4.300.0060.00016.56
7.4.290.0020.00516.47
7.4.280.0000.00816.44
7.4.270.0030.00316.40
7.4.260.0070.00016.59
7.4.250.0000.00716.50
7.4.240.0000.00716.58
7.4.230.0000.00716.58
7.4.220.0060.01316.63
7.4.210.0060.01316.64
7.4.200.0000.00716.66
7.4.160.0080.01316.52
7.4.150.0030.01917.40
7.4.140.0120.01117.86
7.4.130.0150.00616.60
7.4.120.0080.01016.53
7.4.110.0070.01116.43
7.4.100.0060.01216.47
7.4.90.0070.01116.40
7.4.80.0160.00319.39
7.4.70.0120.00916.54
7.4.60.0070.01016.61
7.4.50.0060.00616.38
7.4.40.0100.00716.41
7.4.30.0140.00416.47
7.4.00.0020.01614.90
7.3.330.0030.00213.14
7.3.320.0050.00013.23
7.3.310.0050.00316.52
7.3.300.0000.00716.23
7.3.290.0070.00816.32
7.3.280.0090.00716.31
7.3.270.0140.00317.40
7.3.260.0090.01416.31
7.3.250.0140.00516.45
7.3.240.0070.01016.38
7.3.230.0110.00816.43
7.3.210.0030.01416.25
7.3.200.0070.01416.32
7.3.190.0170.00516.61
7.3.180.0140.00716.36
7.3.170.0080.01116.44
7.3.160.0120.00316.42
7.3.120.0090.00714.85
7.3.110.0060.01115.08
7.3.100.0080.00814.71
7.3.90.0080.00815.14
7.3.80.0080.00514.85
7.3.70.0100.00714.71
7.3.60.0030.01114.79
7.3.50.0070.00614.84
7.3.40.0100.00514.71
7.3.30.0040.00814.96
7.3.20.0070.00416.57
7.3.10.0050.00916.74
7.3.00.0050.00616.63
7.2.330.0110.01416.84
7.2.320.0120.00616.87
7.2.310.0060.00916.89
7.2.300.0030.01616.78
7.2.290.0090.00916.84
7.2.250.0080.01015.13
7.2.240.0100.00815.20
7.2.230.0070.01015.14
7.2.220.0080.00815.04
7.2.210.0070.00915.08
7.2.200.0050.00915.14
7.2.190.0020.01315.19
7.2.180.0050.00915.00
7.2.170.0040.01114.85
7.2.60.0000.01616.64
7.1.330.0100.00315.75
7.1.320.0020.01215.83
7.1.310.0120.00616.05
7.1.300.0050.00715.84
7.1.290.0050.01015.80
7.1.280.0020.00815.81
7.1.270.0030.00815.90
7.1.260.0050.00815.86
7.1.200.0040.00815.94
7.1.90.0110.00317.82
7.1.80.0030.01518.13
7.1.70.0050.00916.88
7.1.60.0140.01135.03
7.1.50.0140.01434.77
7.1.40.0210.00734.62
7.1.30.0130.01334.43
7.1.20.0130.01334.64
7.1.10.0140.00016.48
7.1.00.0030.01016.72
7.0.200.0040.01116.47
7.0.190.0020.01316.81
7.0.180.0120.00216.43
7.0.170.0030.01016.16
7.0.160.0110.00416.26
7.0.150.0070.00716.51
7.0.140.0110.00316.28
7.0.130.0090.00316.43
7.0.120.0050.00716.53
7.0.110.0040.00816.20
7.0.100.0040.00816.22
7.0.90.0030.01016.42
7.0.80.0030.00916.37
7.0.70.0070.00716.22
7.0.60.0080.00516.18
7.0.50.0130.00016.31
7.0.40.0050.00816.52
7.0.30.0030.00916.23
7.0.20.0050.00816.31
7.0.10.0060.00916.46
7.0.00.0100.00316.43

preferences:
21.9 ms | 401 KiB | 5 Q