3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( '0' => array ( 'tenure' => '1 year to less than 2 years' ), '1' => array ( 'tenure' => '10 years to less than 15 years' ), '2' => array ( 'tenure' => '15 years or more' ), '3' => array ( 'tenure' => '2 years to less than 5 years' ), '4' => array ( 'tenure' => '5 years to less than 10 years' ) ); $res=[]; array_walk($arr, function($v, $k) use (&$res){ $key = substr($v['tenure'], 0, strspn($v['tenure'], "0123456789")); $res[$key] = $v; }); ksort($res); print_r($res);

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.4.130.0100.01118.76
8.4.120.0120.00820.30
8.4.110.0060.00317.89
8.4.100.0070.00517.79
8.4.90.0100.01020.67
8.4.80.0140.00718.87
8.4.70.0110.01019.18
8.4.60.0130.00820.57
8.4.50.0100.01418.61
8.4.40.0060.01319.40
8.4.30.0100.00620.23
8.4.20.0130.00720.71
8.4.10.0030.00619.56
8.3.260.0050.00316.74
8.3.250.0060.00216.52
8.3.240.0100.01016.54
8.3.230.0050.00416.48
8.3.220.0060.00318.72
8.3.210.0080.00616.60
8.3.200.0070.00216.79
8.3.190.0120.00717.16
8.3.180.0110.00618.82
8.3.170.0080.00018.85
8.3.160.0060.00918.88
8.3.150.0130.00616.47
8.3.140.0050.00519.12
8.3.130.0090.00018.51
8.3.120.0060.01220.71
8.3.110.0000.00818.29
8.3.100.0050.00316.39
8.3.90.0040.00426.77
8.3.80.0070.00316.63
8.3.70.0090.00916.63
8.3.60.0140.00418.06
8.3.50.0130.00717.45
8.3.40.0090.00618.75
8.3.30.0120.00318.80
8.3.20.0050.00321.87
8.3.10.0050.00219.11
8.3.00.0030.00721.60
8.2.290.0070.00418.67
8.2.280.0070.00518.13
8.2.270.0110.00718.67
8.2.260.0030.00517.08
8.2.250.0090.00016.71
8.2.240.0030.00619.17
8.2.230.0000.00820.94
8.2.220.0030.00716.74
8.2.210.0060.01326.77
8.2.200.0000.00916.50
8.2.190.0140.00316.58
8.2.180.0110.00725.92
8.2.170.0000.01822.96
8.2.160.0070.00720.55
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0060.00320.53
8.2.100.0060.00617.97
8.2.90.0090.00017.97
8.2.80.0060.00317.97
8.2.70.0030.00617.93
8.2.60.0030.00618.22
8.2.50.0040.00418.10
8.2.40.0050.00219.39
8.2.30.0000.00919.39
8.2.20.0040.00418.14
8.2.10.0000.00718.86
8.2.00.0040.00419.43
8.1.330.0090.00616.35
8.1.320.0170.00815.99
8.1.310.0100.00716.80
8.1.300.0030.00619.45
8.1.290.0060.00330.84
8.1.280.0210.00425.92
8.1.270.0080.00022.27
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0110.00019.09
8.1.230.0100.00320.96
8.1.220.0080.00017.78
8.1.210.0060.00318.80
8.1.200.0090.00017.35
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0030.00618.59
8.1.160.0040.00418.75
8.1.150.0000.00718.96
8.1.140.0050.00218.82
8.1.130.0000.00720.15
8.1.120.0040.00417.54
8.1.110.0000.00717.52
8.1.100.0050.00217.55
8.1.90.0080.00017.48
8.1.80.0080.00017.39
8.1.70.0070.00017.52
8.1.60.0060.00317.64
8.1.50.0040.00417.52
8.1.40.0040.00417.52
8.1.30.0090.00017.55
8.1.20.0040.00417.65
8.1.10.0040.00417.55
8.1.00.0070.00317.54
8.0.300.0040.00419.69
8.0.290.0080.00016.75
8.0.280.0070.00018.32
8.0.270.0070.00017.14
8.0.260.0000.00818.34
8.0.250.0020.00516.91
8.0.240.0040.00416.86
8.0.230.0000.00717.00
8.0.220.0070.00016.76
8.0.210.0000.00716.76
8.0.200.0000.00716.82
8.0.190.0000.00716.82
8.0.180.0040.00416.83
8.0.170.0060.00316.92
8.0.160.0050.00516.93
8.0.150.0030.00516.81
8.0.140.0000.00716.83
8.0.130.0030.00313.20
8.0.120.0000.00816.77
8.0.110.0000.00816.91
8.0.100.0040.00416.96
8.0.90.0040.00416.94
8.0.80.0070.01116.86
8.0.70.0000.00816.93
8.0.60.0000.00716.73
8.0.50.0050.00216.98
8.0.30.0190.00017.14
8.0.20.0190.02016.90
8.0.10.0040.00417.13
8.0.00.0070.01116.72
7.4.330.0000.00415.55
7.4.320.0060.00016.41
7.4.300.0000.00616.56
7.4.290.0030.00316.48
7.4.280.0000.00716.59
7.4.270.0040.00416.65
7.4.260.0040.00416.58
7.4.250.0070.00016.57
7.4.240.0030.00316.59
7.4.230.0000.00716.63
7.4.220.0070.00016.39
7.4.210.0040.01216.54
7.4.200.0000.00716.68
7.4.160.0080.01016.63
7.4.130.0230.00016.41
7.4.120.0060.01116.52
7.4.110.0090.00916.54
7.4.100.0060.01616.38
7.4.90.0100.00716.66
7.4.80.0060.01219.39
7.4.70.0120.00616.41
7.4.60.0090.01016.56
7.4.50.0040.01116.30
7.4.40.0070.00716.34
7.4.10.0060.01215.04
7.4.00.0070.01014.92
7.3.330.0060.00013.44
7.3.320.0000.00513.32
7.3.310.0000.00716.40
7.3.300.0000.00716.24
7.3.290.0040.00416.36
7.3.280.0100.00716.31
7.3.260.0090.01116.48
7.3.240.0090.00816.45
7.3.230.0100.00816.43
7.3.210.0150.00316.29
7.3.200.0040.01216.30
7.3.190.0080.00816.62
7.3.180.0100.00716.65
7.3.170.0110.01116.50
7.3.160.0080.01416.32
7.3.130.0070.01014.92
7.3.120.0040.01114.79
7.3.110.0070.00614.88
7.3.100.0070.00814.85
7.3.90.0060.01014.85
7.3.80.0100.00315.01
7.3.70.0100.00514.87
7.3.60.0040.01214.74
7.3.50.0060.00514.87
7.3.40.0070.00814.88
7.3.30.0070.00614.91
7.3.20.0050.00916.66
7.3.10.0070.00716.58
7.3.00.0100.00616.72
7.2.330.0120.00616.38
7.2.320.0060.01016.63
7.2.310.0030.01416.71
7.2.300.0070.01116.36
7.2.290.0040.01316.52
7.2.260.0100.00515.08
7.2.250.0070.01214.96
7.2.240.0110.00615.01
7.2.230.0010.01415.04
7.2.220.0050.00714.87
7.2.210.0080.00714.84
7.2.200.0050.01014.90
7.2.190.0090.00814.98
7.2.180.0090.00514.95
7.2.170.0060.01015.01
7.2.160.0070.00714.80
7.2.150.0090.00616.86
7.2.140.0040.01116.62
7.2.130.0070.00716.97
7.2.120.0040.01016.92
7.2.110.0080.00316.92
7.2.100.0070.00516.74
7.2.90.0100.00517.03
7.2.80.0070.00716.86
7.2.70.0030.00816.99
7.2.60.0080.00516.87
7.2.50.0120.00216.93
7.2.40.0130.00316.84
7.2.30.0040.00916.89
7.2.20.0060.00916.99
7.2.10.0080.01015.92
7.2.00.0030.01216.06
7.1.330.0060.00715.65
7.1.320.0080.00615.92
7.1.310.0070.00615.65
7.1.300.0100.00515.76
7.1.290.0050.00715.68
7.1.280.0070.00615.72
7.1.270.0060.00715.74
7.1.260.0060.00515.72
7.1.250.0080.00315.90
7.1.240.0070.00415.77
7.1.230.0000.00815.75
7.1.220.0060.00915.88
7.1.210.0030.00915.84
7.1.200.0100.00315.78
7.1.190.0110.00316.00
7.1.180.0000.01216.00
7.1.170.0060.00615.84
7.1.160.0060.00615.74
7.1.150.0060.00315.48
7.1.140.0070.00715.83
7.1.130.0090.00615.71
7.1.120.0040.00815.87
7.1.110.0090.00615.99
7.1.100.0030.00615.93
7.1.90.0030.01315.57
7.1.80.0030.00915.94
7.1.70.0000.01015.98
7.1.60.0030.01015.84
7.1.50.0080.00615.60
7.1.40.0000.00815.80
7.1.30.0060.00315.73
7.1.20.0030.01015.79
7.1.10.0030.01015.75
7.1.00.0040.01215.59

preferences:
17.76 ms | 403 KiB | 5 Q