3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ved_decode($ved) { // Copyright 2013 Deed Poll Office Ltd, UK <https://deedpolloffice.com> // Licensed under Apache Licence v2.0 <http://apache.org/licenses/LICENSE-2.0> $keys = array('t' => 2, 'r' => 6, 's' => 7, 'i' => 1); $ret = array(); if (substr($ved, 0, 1) == '1') { preg_match_all('/([a-z]+):([0-9]+)/i', $ved, $matches, PREG_SET_ORDER); foreach ($matches as $m) $ret[isset($keys[$m[1]]) ? $keys[$m[1]] : $m[1]] = (int) $m[2]; return $ret; } preg_match_all('/([\x80-\xff]*[\0-\x7f])([\x80-\xff]*[\0-\x7f])/', base64_decode(str_replace(array('_','-'), array('+','/'), substr($ved, 1))), $matches, PREG_SET_ORDER); foreach ($matches as $m) { $key = $val = 0; foreach (str_split($m[1]) as $i => $c) $key += (ord($c) & 0x7f) << $i * 7; foreach (str_split($m[2]) as $i => $c) $val += (ord($c) & 0x7f) << $i * 7; $ret[$key >> 3] = $val; } return $ret; } // Example of use: print_r(ved_decode('ahUKEwiHlMTro9_bAhVEtxQKHbTpDKAQFgiIAjAL'));

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.01317.00
8.3.50.0180.00418.61
8.3.40.0060.00918.91
8.3.30.0110.00418.81
8.3.20.0090.00019.10
8.3.10.0080.00019.42
8.3.00.0040.00423.65
8.2.180.0110.01116.63
8.2.170.0070.01122.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00519.95
8.2.120.0080.00426.35
8.2.110.0060.00321.23
8.2.100.0070.00419.38
8.2.90.0040.00419.22
8.2.80.0090.00017.97
8.2.70.0050.00317.93
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0000.00819.05
8.2.30.0040.00419.58
8.2.20.0040.00418.05
8.2.10.0000.00718.04
8.2.00.0040.00419.51
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0000.01021.07
8.1.230.0110.00017.82
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.48
8.1.180.0000.00718.10
8.1.170.0040.00418.70
8.1.160.0000.00718.98
8.1.150.0060.00318.80
8.1.140.0080.00017.70
8.1.130.0000.00919.01
8.1.120.0060.00317.68
8.1.110.0080.00017.61
8.1.100.0110.00017.55
8.1.90.0040.00417.51
8.1.80.0040.00417.63
8.1.70.0050.00517.63
8.1.60.0000.00817.59
8.1.50.0040.00417.70
8.1.40.0040.00417.66
8.1.30.0090.00317.84
8.1.20.0020.00517.72
8.1.10.0050.00317.68
8.1.00.0000.00817.61
8.0.300.0030.00618.77
8.0.290.0060.00317.00
8.0.280.0000.00718.55
8.0.270.0070.00017.21
8.0.260.0000.00717.22
8.0.250.0000.00717.16
8.0.240.0030.00317.09
8.0.230.0000.00717.09
8.0.220.0070.00017.07
8.0.210.0040.00417.03
8.0.200.0000.00717.11
8.0.190.0040.00417.12
8.0.180.0000.01217.08
8.0.170.0080.00017.09
8.0.160.0040.00417.05
8.0.150.0000.00716.99
8.0.140.0050.00217.03
8.0.130.0000.00713.44
8.0.120.0000.00816.93
8.0.110.0030.00516.95
8.0.100.0000.00717.01
8.0.90.0040.00416.96
8.0.80.0090.01117.03
8.0.70.0000.00716.91
8.0.60.0000.00816.84
8.0.50.0040.00416.92
8.0.30.0090.00817.19
8.0.20.0090.01017.40
8.0.10.0000.00717.22
8.0.00.0030.01516.99
7.4.330.0000.00615.55
7.4.320.0000.00616.84
7.4.300.0050.00216.59
7.4.290.0000.00716.65
7.4.280.0120.00016.79
7.4.270.0080.00016.81
7.4.260.0030.00616.75
7.4.250.0000.00716.70
7.4.240.0000.00716.65
7.4.230.0030.00316.66
7.4.220.0050.00316.73
7.4.210.0120.00416.73
7.4.200.0040.00416.77
7.4.160.0120.00516.74
7.4.140.0110.00917.86
7.4.130.0090.01216.64
7.4.120.0120.00616.72
7.4.110.0100.00716.85
7.4.100.0100.00716.79
7.4.90.0100.01016.68
7.4.80.0060.01219.39
7.4.70.0080.00816.72
7.4.60.0080.00916.62
7.4.50.0030.01316.58
7.4.40.0040.01516.61
7.3.330.0050.00013.53
7.3.320.0030.00313.36
7.3.310.0080.00016.44
7.3.300.0000.00716.56
7.3.290.0000.00716.61
7.3.280.0100.00616.50
7.3.260.0110.00716.72
7.3.240.0090.00916.65
7.3.230.0130.00416.77
7.3.210.0150.00316.48
7.3.200.0000.01616.49
7.3.190.0150.00416.45
7.3.180.0060.01016.84
7.3.170.0090.00916.86
7.3.160.0030.01216.90
7.2.330.0140.00916.68
7.2.320.0060.01916.94
7.2.310.0100.01716.74
7.2.300.0100.00716.91
7.2.290.0100.01416.98

preferences:
36.57 ms | 400 KiB | 5 Q