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) { var_dump($m); $key = $val = 0; foreach (str_split($m[1]) as $i => $c){ echo ord($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.0160.00317.00
8.3.50.0040.01518.47
8.3.40.0100.00618.98
8.3.30.0080.00818.93
8.3.20.0080.00019.16
8.3.10.0040.00421.09
8.3.00.0040.00423.65
8.2.180.0140.00716.63
8.2.170.0140.00422.96
8.2.160.0090.00620.52
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0090.00019.72
8.2.120.0050.00326.35
8.2.110.0090.00021.09
8.2.100.0110.00019.29
8.2.90.0000.00819.20
8.2.80.0000.00918.03
8.2.70.0050.00318.03
8.2.60.0080.00017.93
8.2.50.0000.00818.10
8.2.40.0050.00319.30
8.2.30.0030.00619.42
8.2.20.0040.00418.25
8.2.10.0040.00418.03
8.2.00.0040.00419.41
8.1.280.0160.00025.92
8.1.270.0050.00322.11
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0100.00021.14
8.1.230.0040.00817.89
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0040.00417.35
8.1.180.0050.00318.10
8.1.170.0040.00418.69
8.1.160.0040.00418.96
8.1.150.0080.00018.94
8.1.140.0040.00417.71
8.1.130.0000.00719.00
8.1.120.0030.00617.51
8.1.110.0040.00417.63
8.1.100.0040.00817.64
8.1.90.0000.00917.65
8.1.80.0030.00517.56
8.1.70.0070.00417.61
8.1.60.0000.00817.78
8.1.50.0080.00017.72
8.1.40.0040.00417.57
8.1.30.0100.00017.85
8.1.20.0030.00517.67
8.1.10.0030.00617.70
8.1.00.0050.00317.54
8.0.300.0110.00018.77
8.0.290.0050.00316.73
8.0.280.0030.00318.48
8.0.270.0030.00517.20
8.0.260.0000.00717.21
8.0.250.0030.00317.11
8.0.240.0030.00516.99
8.0.230.0040.00417.10
8.0.220.0070.00017.09
8.0.210.0030.00317.09
8.0.200.0000.00817.10
8.0.190.0020.00517.15
8.0.180.0080.00317.09
8.0.170.0030.00617.07
8.0.160.0040.00416.95
8.0.150.0040.00417.02
8.0.140.0000.00717.06
8.0.130.0000.00713.52
8.0.120.0040.00416.99
8.0.110.0080.00016.93
8.0.100.0040.00416.96
8.0.90.0040.00416.86
8.0.80.0130.00517.03
8.0.70.0040.00416.90
8.0.60.0000.00817.12
8.0.50.0040.00416.96
8.0.30.0110.00817.34
8.0.20.0110.00817.40
8.0.10.0040.00417.06
8.0.00.0090.01116.72
7.4.330.0060.00015.55
7.4.320.0030.00316.82
7.4.300.0000.00616.83
7.4.290.0030.00316.61
7.4.280.0070.00416.66
7.4.270.0050.00516.78
7.4.260.0000.00816.68
7.4.250.0040.00416.68
7.4.240.0000.00716.82
7.4.230.0000.00716.67
7.4.220.0030.00516.85
7.4.210.0080.00716.79
7.4.200.0070.00016.84
7.4.160.0090.00916.68
7.4.140.0150.00717.86
7.4.130.0190.00316.68
7.4.120.0110.00916.75
7.4.110.0070.01116.69
7.4.100.0090.01216.71
7.4.90.0090.00916.75
7.4.80.0070.01419.39
7.4.70.0040.01416.62
7.4.60.0100.00616.70
7.4.50.0000.01616.79
7.4.40.0090.00916.61
7.4.00.0120.00715.03
7.3.330.0050.00013.30
7.3.320.0050.00013.52
7.3.310.0040.00416.54
7.3.300.0030.00316.42
7.3.290.0030.00316.49
7.3.280.0100.00716.52
7.3.260.0150.00616.69
7.3.240.0120.00816.67
7.3.230.0100.00716.87
7.3.210.0130.01016.46
7.3.200.0160.00316.57
7.3.190.0160.00316.75
7.3.180.0080.01116.48
7.3.170.0170.00316.44
7.3.160.0090.00916.70
7.3.120.0070.01014.99
7.3.110.0090.01015.18
7.3.100.0130.00315.14
7.3.90.0000.01215.16
7.3.80.0070.01015.27
7.3.70.0060.00314.84
7.3.60.0150.00415.05
7.3.50.0040.00815.04
7.3.40.0100.00315.08
7.3.30.0070.00715.16
7.3.20.0130.00316.80
7.3.10.0030.01017.04
7.3.00.0040.00816.95
7.2.330.0110.00716.93
7.2.320.0060.02016.77
7.2.310.0100.01316.81
7.2.300.0160.00616.89
7.2.290.0190.00016.83
7.2.250.0120.00815.37
7.2.240.0100.01015.30
7.2.230.0040.01515.28
7.2.220.0030.00915.03
7.2.210.0030.01315.20
7.2.200.0120.00315.36
7.2.190.0030.01414.93
7.2.180.0060.00915.44
7.2.170.0060.00615.35
7.2.60.0030.01217.08
7.2.50.0040.01217.09
7.2.40.0110.00417.11
7.2.30.0150.00316.67
7.2.20.0140.00317.09
7.2.10.0040.01216.78
7.2.00.0150.00017.00
7.1.330.0080.00816.07
7.1.320.0110.00415.92
7.1.310.0000.01616.19
7.1.300.0110.00715.92
7.1.290.0090.00616.08
7.1.280.0090.00315.92
7.1.270.0060.01215.94
7.1.260.0120.00416.26
7.1.200.0090.00316.19
7.1.170.0110.00415.87
7.1.160.0120.00615.99
7.1.150.0140.00915.73
7.1.140.0030.01215.38
7.1.130.0030.01016.04
7.1.120.0050.00915.93
7.1.110.0060.00915.77
7.1.100.0090.00915.79
7.1.90.0060.00615.89
7.1.80.0000.01215.88
7.1.70.0080.00515.74
7.1.60.0130.02333.93
7.1.50.0250.01133.79
7.1.40.0220.01233.92
7.1.30.0300.00433.77
7.1.20.0250.00933.86
7.1.10.0140.00015.75
7.1.00.0110.00415.89

preferences:
43.56 ms | 400 KiB | 5 Q