3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $a = ['item'=>['werwer'=>['tueiah'=>['auihi'=>'wieurh']]]; // $s = 'item.werwer.tueiah.auihi.wieurh'; $a = ['item'=>'werwer']; $s = 'item.werwer'; echo get($a, $s); // echo substr($s,0,strpos($s,'.'))."\n"; // echo substr($s,strpos($s,'.')+1)."\n"; function get($i, $c){ if(strpos($c,'.')){ $next = substr($s,0,strpos($s,'.')); $rem = substr($s,strpos($s,'.')+1); return get($i[$next], $rem); }else{ return $i[$c]; } }

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.40.0110.00318.92
8.3.30.0120.00318.88
8.3.20.0000.00720.25
8.3.10.0040.00423.71
8.3.00.0070.00319.80
8.2.170.0070.01022.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0050.00321.00
8.2.110.0060.00319.12
8.2.100.0040.00717.91
8.2.90.0050.00319.34
8.2.80.0070.00317.97
8.2.70.0080.00017.75
8.2.60.0050.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00419.28
8.2.30.0040.00419.92
8.2.20.0000.00717.82
8.2.10.0040.00418.12
8.2.00.0080.00018.06
8.1.270.0040.00420.20
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00420.63
8.1.230.0080.00421.03
8.1.220.0050.00317.79
8.1.210.0030.00618.77
8.1.200.0030.00617.22
8.1.190.0050.00317.10
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0000.00721.93
8.1.150.0040.00418.84
8.1.140.0040.00417.40
8.1.130.0050.00217.69
8.1.120.0040.00417.32
8.1.110.0000.00717.40
8.1.100.0000.00717.39
8.1.90.0000.00717.44
8.1.80.0030.00517.34
8.1.70.0000.00717.40
8.1.60.0040.00417.47
8.1.50.0000.00817.57
8.1.40.0000.00717.53
8.1.30.0040.00417.54
8.1.20.0000.00817.71
8.1.10.0060.00317.57
8.1.00.0030.00617.53
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0050.00218.46
8.0.270.0000.00717.29
8.0.260.0040.00417.27
8.0.250.0090.00017.02
8.0.240.0030.00316.95
8.0.230.0040.00416.88
8.0.220.0000.00716.93
8.0.210.0030.00316.94
8.0.200.0000.00616.92
8.0.190.0040.00417.02
8.0.180.0040.00416.93
8.0.170.0040.00416.98
8.0.160.0060.00316.95
8.0.150.0030.00316.88
8.0.140.0000.00816.74
8.0.130.0050.00313.27
8.0.120.0000.00816.89
8.0.110.0050.00216.80
8.0.100.0000.00716.90
8.0.90.0040.00416.78
8.0.80.0030.01016.87
8.0.70.0040.00416.79
8.0.60.0050.00216.94
8.0.50.0020.00516.80
8.0.30.0110.01217.02
8.0.20.0060.01617.40
8.0.10.0000.00717.06
8.0.00.0110.00816.66
7.4.330.0050.00015.08
7.4.320.0000.00816.55
7.4.300.0030.00516.52
7.4.290.0070.00016.55
7.4.280.0040.00416.68
7.4.270.0030.00316.64
7.4.260.0030.00616.46
7.4.250.0030.00516.51
7.4.240.0020.00516.55
7.4.230.0030.00316.62
7.4.220.0060.01316.56
7.4.210.0050.00916.63
7.4.200.0000.00716.41
7.4.160.0090.00616.50
7.4.150.0150.00617.40
7.4.140.0150.00717.86
7.4.130.0140.00316.63
7.4.120.0110.00516.51
7.4.110.0130.00416.43
7.4.100.0100.01316.48
7.4.90.0120.00616.55
7.4.80.0070.01419.39
7.4.70.0070.01316.45
7.4.60.0130.00316.65
7.4.50.0000.00416.37
7.4.40.0090.00916.61
7.4.30.0100.01316.58
7.4.00.0060.01214.93
7.3.330.0030.00313.24
7.3.320.0000.00613.34
7.3.310.0000.00816.41
7.3.300.0030.00316.33
7.3.290.0000.00716.25
7.3.280.0100.00716.39
7.3.270.0150.00417.40
7.3.260.0130.01016.36
7.3.250.0130.00616.57
7.3.240.0130.00916.59
7.3.230.0070.01716.53
7.3.210.0000.01516.50
7.3.200.0100.00716.35
7.3.190.0070.01016.48
7.3.180.0060.01616.39
7.3.170.0100.00616.56
7.3.160.0120.00416.34
7.3.120.0030.01014.73
7.3.110.0100.00314.89
7.3.100.0030.00614.70
7.3.90.0080.00814.86
7.3.80.0070.00714.89
7.3.70.0060.00614.84
7.3.60.0070.01014.64
7.3.50.0030.01314.63
7.3.40.0100.00614.84
7.3.30.0040.01214.69
7.3.20.0070.01016.71
7.3.10.0060.00616.70
7.3.00.0040.00616.75
7.2.330.0120.00616.41
7.2.320.0170.00616.74
7.2.310.0090.01216.73
7.2.300.0080.00816.81
7.2.290.0070.01116.77
7.2.240.0070.00715.35
7.2.230.0070.00715.27
7.2.220.0000.01515.25
7.2.210.0030.01014.93
7.2.200.0030.01014.80
7.2.190.0030.01315.12
7.2.180.0030.01014.86
7.2.170.0060.01014.94
7.2.160.0070.01115.19
7.2.150.0040.01117.11
7.2.140.0070.01016.76
7.2.130.0070.00616.66
7.2.120.0050.00716.71
7.2.110.0090.00616.89
7.2.100.0070.00716.96
7.2.90.0070.00516.97
7.2.80.0060.00716.88
7.2.70.0070.00716.88
7.2.60.0050.00716.87
7.2.50.0080.00517.02
7.2.40.0060.00917.07
7.2.30.0070.00616.97
7.2.20.0070.00717.01
7.2.10.0070.00416.78
7.2.00.0070.00917.86
7.1.330.0100.00616.01
7.1.320.0060.00915.85
7.1.310.0040.00715.58
7.1.300.0030.00715.88
7.1.290.0040.00715.93
7.1.280.0110.00015.75
7.1.270.0000.01315.66
7.1.260.0000.01415.98
7.1.250.0010.01015.77
7.1.200.0120.00015.55
7.1.100.0060.00318.20
7.1.70.0060.00317.29
7.1.60.0170.00719.13
7.1.50.0070.01316.69
7.1.00.0070.06722.33
7.0.200.0000.01016.91
7.0.60.0100.08320.06
7.0.50.0100.05317.73
7.0.40.0130.04320.26
7.0.30.0570.05720.11
7.0.20.0270.06020.20
7.0.10.0030.04320.15
7.0.00.0100.08720.25
5.6.280.0000.03320.86
5.6.210.0100.03320.51
5.6.200.0100.08018.22
5.6.190.0070.08020.46
5.6.180.3670.04020.46
5.6.170.0370.07020.43
5.6.160.0100.08020.52
5.6.150.0100.04718.27
5.6.140.0070.06718.24
5.6.130.0070.04018.11
5.6.120.0100.06720.99
5.6.110.0070.07321.05
5.6.100.0100.08021.12
5.6.90.0130.05721.11
5.6.80.0070.08320.38
5.6.70.4030.03720.53
5.5.350.0070.06020.39
5.5.340.0030.04717.92
5.5.330.0030.08720.26
5.5.320.0330.07320.18
5.5.310.0330.07020.34
5.5.300.0070.06317.97
5.5.290.0070.08017.95
5.5.280.0000.04320.77
5.5.270.0200.06320.87
5.5.260.0130.03320.87
5.5.250.0070.05020.47
5.5.240.0230.06720.16
5.4.450.1130.06319.38
5.4.440.0930.04019.55
5.4.430.0870.04719.39
5.4.420.0730.06019.37
5.4.410.0930.06319.25
5.4.400.0800.04719.35
5.4.390.0800.05019.22
5.4.380.0830.04718.83
5.4.370.0770.05019.08
5.4.360.0900.04319.24
5.4.350.0830.04719.07
5.4.340.0730.05719.25
5.4.320.0730.05719.07
5.4.310.0700.05718.82
5.4.300.0870.04018.92
5.4.290.0830.05019.05
5.4.280.0770.05319.06
5.4.270.0800.05019.07
5.4.260.0770.05319.05
5.4.250.0830.04719.00
5.4.240.0830.04319.25
5.4.230.0900.05319.22
5.4.220.0800.05319.25
5.4.210.0700.06019.25
5.4.200.0770.05019.25
5.4.190.0870.04319.25
5.4.180.0800.04719.33
5.4.170.0770.05319.21
5.4.160.0770.05319.04
5.4.150.0930.03718.80
5.4.140.0730.03716.50
5.4.130.0570.05716.52
5.4.120.0530.05016.39
5.4.110.0630.04716.61
5.4.100.0630.04716.63
5.4.90.0730.04316.58
5.4.80.0670.05016.50
5.4.70.0030.07316.40
5.4.60.0400.06316.38
5.4.50.0030.05016.42
5.4.40.0300.05716.51
5.4.30.0300.04016.41
5.4.20.0270.06316.43

preferences:
48.56 ms | 400 KiB | 5 Q