3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Parse an address spec string into an array * * @param $address * @return array * @throws \LogicException */ function parseAddress($address) { if ((!($parts = parse_url($address)) && !($parts = parse_url(preg_replace('#^([^:]+:/)//#', '$1', $address)))) || !isset($parts['scheme']) ) { throw new LogicException('Invalid address spec: ' . $address); } $parts['scheme'] = strtolower($parts['scheme']); return $parts; } var_dump(parseAddress('unix:///foo/bar.sock'));

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.0100.00318.29
8.3.50.0090.01021.21
8.3.40.0080.01219.04
8.3.30.0100.00320.17
8.3.20.0060.00320.68
8.3.10.0080.00021.13
8.3.00.0040.00422.44
8.2.180.0100.01316.63
8.2.170.0140.00722.96
8.2.160.0140.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0060.00321.16
8.2.110.0070.00319.33
8.2.100.0090.00317.92
8.2.90.0060.00319.25
8.2.80.0050.00319.14
8.2.70.0080.00017.86
8.2.60.0050.00518.05
8.2.50.0080.00018.07
8.2.40.0040.00418.28
8.2.30.0000.00819.47
8.2.20.0040.00417.79
8.2.10.0080.00018.00
8.2.00.0060.00617.96
8.1.280.0150.00425.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00722.50
8.1.230.0090.00320.92
8.1.220.0000.00818.77
8.1.210.0050.00318.89
8.1.200.0030.00617.47
8.1.190.0080.00017.64
8.1.180.0060.00318.10
8.1.170.0040.00418.77
8.1.160.0040.00418.91
8.1.150.0000.00818.80
8.1.140.0050.00317.64
8.1.130.0070.00017.75
8.1.120.0050.00217.58
8.1.110.0040.00417.52
8.1.100.0040.00317.67
8.1.90.0070.00017.51
8.1.80.0000.00717.60
8.1.70.0000.00717.58
8.1.60.0060.00317.69
8.1.50.0040.00417.67
8.1.40.0030.00617.69
8.1.30.0050.00317.84
8.1.20.0000.00817.84
8.1.10.0040.00417.70
8.1.00.0060.00317.68
8.0.300.0080.00019.89
8.0.290.0000.00717.18
8.0.280.0070.00018.35
8.0.270.0000.00717.27
8.0.260.0000.00716.96
8.0.250.0000.00717.13
8.0.240.0060.00417.10
8.0.230.0000.00717.07
8.0.220.0070.00017.04
8.0.210.0040.00416.99
8.0.200.0000.00617.09
8.0.190.0040.00417.06
8.0.180.0040.00417.07
8.0.170.0050.00317.00
8.0.160.0000.00717.07
8.0.150.0040.00417.00
8.0.140.0030.00516.88
8.0.130.0060.00013.44
8.0.120.0000.00816.88
8.0.110.0000.00817.02
8.0.100.0000.00717.05
8.0.90.0040.00416.91
8.0.80.0110.00717.07
8.0.70.0040.00417.09
8.0.60.0030.00517.02
8.0.50.0040.00417.07
8.0.30.0160.00317.28
8.0.20.0110.01017.40
8.0.10.0040.00417.05
8.0.00.0070.01016.89
7.4.330.0000.00516.79
7.4.320.0030.00316.72
7.4.300.0030.00316.62
7.4.290.0070.00016.73
7.4.280.0000.00716.80
7.4.270.0000.00716.84
7.4.260.0000.00513.43
7.4.250.0040.00416.80
7.4.240.0020.00516.83
7.4.230.0030.00316.70
7.4.220.0090.00916.86
7.4.210.0060.01116.74
7.4.200.0000.00716.82
7.4.190.0040.00416.86
7.4.160.0160.00016.84
7.4.150.0120.01217.40
7.4.140.0100.00817.86
7.4.130.0090.00916.75
7.4.120.0110.01216.65
7.4.110.0160.00616.73
7.4.100.0120.00616.69
7.4.90.0120.00616.49
7.4.80.0100.00619.39
7.4.70.0120.00616.59
7.4.60.0070.01016.76
7.4.50.0060.00316.77
7.4.40.0080.00822.77
7.4.30.0090.00916.62
7.4.00.0000.01615.01
7.3.330.0050.00013.46
7.3.320.0030.00313.26
7.3.310.0040.00416.42
7.3.300.0000.00716.44
7.3.290.0100.00316.51
7.3.280.0090.00716.50
7.3.270.0110.01017.40
7.3.260.0100.00918.24
7.3.250.0100.00816.78
7.3.240.0120.00916.52
7.3.230.0070.01016.72
7.3.210.0160.00316.43
7.3.200.0130.00619.39
7.3.190.0100.01316.91
7.3.180.0050.01016.52
7.3.170.0090.00616.27
7.3.160.0070.01116.31
7.3.120.0100.00314.68
7.2.330.0070.01016.93
7.2.320.0090.00916.77
7.2.310.0070.01416.76
7.2.300.0130.00316.63
7.2.290.0190.00016.76
7.2.60.0080.00416.76
7.2.00.0070.00719.81
7.1.200.0060.00915.86
7.1.100.0030.00918.27
7.1.70.0030.00717.54
7.1.60.0100.01319.17
7.1.50.0100.01617.02
7.1.00.0030.03322.55
7.0.200.0040.00416.96
7.0.140.0000.07722.04
7.0.70.4830.04719.89
7.0.60.0030.08320.02
7.0.50.0000.09017.98
7.0.40.0200.07720.24
7.0.30.0600.06720.17
7.0.20.0270.06020.26
7.0.10.0300.06720.29
7.0.00.0070.09320.25
5.6.280.0100.06721.11
5.6.210.0030.08320.46
5.6.200.0030.08318.18
5.6.190.0070.09020.38
5.6.180.0030.08720.46
5.6.170.0200.07720.43
5.6.160.0170.07320.52
5.6.150.0100.07718.21
5.6.140.0070.04318.14
5.6.130.0000.09018.18
5.6.120.0070.09321.01
5.6.110.0030.08721.01
5.6.100.0000.04721.03
5.6.90.0100.08021.01
5.6.80.0030.07020.51
5.6.70.0300.07020.40
5.5.350.0070.08320.53
5.5.340.0000.05017.98
5.5.330.0170.04020.25
5.5.320.0000.08720.22
5.5.310.0300.07720.29
5.5.300.0070.05717.92
5.5.290.0100.07717.97
5.5.280.0030.04020.87
5.5.270.0030.07320.87
5.5.260.0100.08020.86
5.5.250.0030.07020.69
5.5.240.0170.07020.19
5.4.450.0230.07719.55
5.4.440.0200.05719.27
5.4.430.0130.07719.52
5.4.420.0100.04019.52
5.4.410.0170.06319.35
5.4.400.0270.05019.23
5.4.390.0200.07319.00
5.4.380.0230.07319.14
5.4.370.0200.07319.06
5.4.360.0270.04718.95
5.4.350.0300.06319.09
5.4.340.0200.05718.87
5.4.320.0330.06719.20
5.4.310.0170.05019.07
5.4.300.0130.07318.86
5.4.290.0130.04718.94
5.4.280.0130.08018.85
5.4.270.0130.05318.87
5.4.260.0170.07719.06
5.4.250.0130.04319.13
5.4.240.0130.05019.18
5.4.230.0230.06718.88
5.4.220.0270.06719.07
5.4.210.0200.05319.14
5.4.200.0070.05319.06
5.4.190.0070.04318.98
5.4.180.0300.06318.84
5.4.170.0200.05318.95
5.4.160.0270.06319.05
5.4.150.0100.06018.93
5.4.140.0200.03316.41
5.4.130.0230.04716.36
5.4.120.0100.04316.48
5.4.110.0230.06316.61
5.4.100.0330.04316.31
5.4.90.0200.04316.61
5.4.80.0200.04016.48
5.4.70.0170.04316.62
5.4.60.0200.04316.43
5.4.50.0270.05316.38
5.4.40.0200.07016.38
5.4.30.0300.06016.51
5.4.20.0170.03716.52
5.4.10.0130.07316.51
5.4.00.0130.04015.76
5.3.290.0170.06314.73
5.3.280.0100.03714.52
5.3.270.0270.06714.82
5.3.260.0170.06314.82
5.3.250.0230.04314.68
5.3.240.0170.07014.57
5.3.230.0100.07314.50
5.3.220.0070.04014.46
5.3.210.0230.05714.72
5.3.200.0230.07014.64
5.3.190.0170.04014.54
5.3.180.0200.03714.67
5.3.170.0230.07014.49
5.3.160.0170.07714.57
5.3.150.0200.07014.64
5.3.140.0130.04314.45
5.3.130.0200.04314.56
5.3.120.0130.08014.71
5.3.110.0130.04714.45
5.3.100.0330.03313.97
5.3.90.0200.03714.07
5.3.80.0070.05713.99
5.3.70.0100.07714.02
5.3.60.0230.07013.94
5.3.50.0200.06313.95
5.3.40.0130.04014.11
5.3.30.0200.03713.82
5.3.20.0100.04013.59
5.3.10.0170.03313.71
5.3.00.0230.03713.69
5.2.170.0070.07012.05
5.2.160.0100.05312.05
5.2.150.0170.03312.05
5.2.140.0230.02312.05
5.2.130.0170.02712.05
5.2.120.0100.03012.05
5.2.110.0070.03012.05
5.2.100.0170.02712.05
5.2.90.0100.03012.05
5.2.80.0130.03312.05
5.2.70.0100.03012.05
5.2.60.0030.03712.05
5.2.50.0130.02312.05
5.2.40.0170.03312.05
5.2.30.0100.02712.05
5.2.20.0130.02712.05
5.2.10.0100.02712.05
5.2.00.0130.02312.05
5.1.60.0130.02312.05
5.1.50.0170.02012.05
5.1.40.0100.02312.05
5.1.30.0270.01712.05
5.1.20.0170.02312.05
5.1.10.0100.02312.05
5.1.00.0100.02712.05
5.0.50.0100.01712.05
5.0.40.0030.02012.05
5.0.30.0100.02712.05
5.0.20.0030.02012.05
5.0.10.0030.02312.05
5.0.00.0130.02712.05
4.4.90.0030.01312.05
4.4.80.0100.01012.05
4.4.70.0100.01012.05
4.4.60.0030.01312.05
4.4.50.0070.01312.05
4.4.40.0030.02712.05
4.4.30.0030.01712.05
4.4.20.0070.01712.05
4.4.10.0070.01312.05
4.4.00.0030.02712.05
4.3.110.0070.01312.05
4.3.100.0030.01712.05
4.3.90.0030.01712.05
4.3.80.0070.02712.05
4.3.70.0100.01012.05
4.3.60.0070.01312.05
4.3.50.0070.01312.05
4.3.40.0030.02312.05
4.3.30.0000.01712.05
4.3.20.0030.01312.05
4.3.10.0000.01712.05
4.3.00.0030.01712.05

preferences:
62.94 ms | 401 KiB | 5 Q