3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = []; $fetch_elements = ['property', 'price']; $_SERVER['QUERY_STRING'] = 'https://www.example.com?id=safety&order=1&price=0..995&property[172]=Canasafe'; parse_str(parse_url($_SERVER['QUERY_STRING'], PHP_URL_QUERY), $elements); foreach ($elements as $k=>$e) { if (in_array($k, $fetch_elements)) { $result[$k] = $e; } } // print_r($result); echo urldecode(http_build_query($result));

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.1.20.0060.00317.69
8.1.10.0000.00817.56
8.1.00.0000.00817.38
8.0.150.0060.00316.80
8.0.140.0050.00516.89
8.0.130.0030.00313.36
8.0.120.0030.00516.90
8.0.110.0080.00016.91
8.0.100.0070.00016.80
8.0.90.0040.00316.85
8.0.80.0090.00616.95
8.0.70.0050.00316.79
8.0.60.0040.00416.83
8.0.50.0050.00216.68
8.0.30.0130.00816.97
8.0.20.0090.00917.38
8.0.10.0030.00516.86
8.0.00.0080.01216.64
7.4.270.0060.00316.61
7.4.260.0080.00016.39
7.4.250.0070.00016.46
7.4.240.0070.00016.36
7.4.230.0000.00716.63
7.4.220.0000.00816.38
7.4.210.0130.00416.55
7.4.200.0040.00416.50
7.4.160.0050.01016.43
7.4.140.0120.00917.86
7.4.130.0080.01016.40
7.4.120.0090.00916.48
7.4.110.0100.00716.53
7.4.100.0060.01216.43
7.4.90.0070.01016.46
7.4.80.0060.01319.39
7.4.70.0130.00316.41
7.4.60.0080.00816.37
7.4.50.0030.01416.69
7.4.40.0130.00316.52
7.4.00.0000.01114.61
7.3.330.0060.00013.17
7.3.320.0030.00313.27
7.3.310.0030.00516.26
7.3.300.0070.00016.24
7.3.290.0040.00416.36
7.3.280.0060.01216.34
7.3.260.0090.01016.55
7.3.240.0110.00816.45
7.3.230.0090.00916.32
7.3.210.0060.01216.40
7.3.200.0130.00516.49
7.3.190.0070.01816.37
7.3.180.0060.01216.36
7.3.170.0130.00416.38
7.3.160.0180.00016.27
7.3.50.0070.01014.72
7.3.40.0060.00614.85
7.3.30.0090.00314.67
7.3.20.0090.00916.56
7.3.10.0040.01216.84
7.3.00.0080.01116.69
7.2.330.0210.00316.73
7.2.320.0070.01016.59
7.2.310.0100.00616.67
7.2.300.0080.01216.79
7.2.290.0060.01316.78
7.2.180.0040.01314.96
7.2.170.0070.00614.85
7.2.160.0070.01415.10
7.2.150.0030.00916.76
7.2.140.0150.00316.91
7.2.130.0120.00916.97
7.2.120.0160.00616.98
7.2.110.0060.00616.99
7.2.100.0030.01016.92
7.2.90.0050.00516.95
7.2.80.0100.00316.91
7.2.70.0000.01316.96
7.2.60.0030.01116.92
7.2.50.0100.00316.77
7.2.40.0070.00716.92
7.2.30.0000.01417.09
7.2.20.0040.01016.96
7.2.10.0100.00316.71
7.2.00.0090.00616.80
7.1.280.0030.01015.66
7.1.270.0070.00315.83
7.1.260.0070.00415.73
7.1.250.0030.00715.77

preferences:
20.35 ms | 455 KiB | 5 Q