3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findNames($variables){ foreach($variables as $variable => $finalVariables){ if($finalVariables['name'] === 'nitin'){ return $finalVariables['name']; } } } $someArrays = [ 0=>['id' => 1, 'name' => 'nitin', 'job' => 'php developer' ], 1=>['id' => 1, 'name' => 'rohit', 'job' => 'DOTNET developer'] ]; var_dump(findNames($someArrays));

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.0130.00916.48
8.3.50.0030.01016.28
8.3.40.0140.00318.44
8.3.30.0070.01018.63
8.3.20.0040.00420.30
8.3.10.0000.00823.52
8.3.00.0070.00023.61
8.2.180.0100.01016.63
8.2.170.0150.00822.96
8.2.160.0040.01120.52
8.2.150.0000.00725.66
8.2.140.0070.00024.66
8.2.130.0000.00722.25
8.2.120.0000.00726.35
8.2.110.0110.00022.24
8.2.100.0040.00720.95
8.2.90.0050.00317.97
8.2.80.0000.00818.04
8.2.70.0040.00418.03
8.2.60.0000.00818.28
8.2.50.0060.00318.10
8.2.40.0030.00520.51
8.2.30.0040.00419.34
8.2.20.0050.00218.13
8.2.10.0030.00518.03
8.2.00.0040.00418.09
8.1.280.0090.00625.92
8.1.270.0040.00423.97
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0080.00320.44
8.1.230.0110.00020.90
8.1.220.0030.00619.18
8.1.210.0040.00420.32
8.1.200.0060.00317.35
8.1.190.0050.00317.22
8.1.180.0050.00318.10
8.1.170.0040.00418.66
8.1.160.0040.00418.87
8.1.150.0000.00818.82
8.1.140.0040.00419.47
8.1.130.0000.00717.40
8.1.120.0040.00417.49
8.1.110.0000.00817.36
8.1.100.0040.00417.45
8.1.90.0030.00617.43
8.1.80.0000.00717.37
8.1.70.0080.00017.45
8.1.60.0030.00617.57
8.1.50.0080.00017.53
8.1.40.0060.00317.41
8.1.30.0040.00417.61
8.1.20.0000.00817.69
8.1.10.0070.00017.44
8.1.00.0050.00317.52
8.0.300.0000.00721.51
8.0.290.0020.00516.75
8.0.280.0070.00018.41
8.0.270.0030.00317.13
8.0.260.0000.00716.73
8.0.250.0030.00316.82
8.0.240.0080.00016.86
8.0.230.0030.00316.95
8.0.220.0030.00316.92
8.0.210.0050.00216.93
8.0.200.0050.00316.80
8.0.190.0040.00416.86
8.0.180.0070.00016.95
8.0.170.0040.00316.87
8.0.160.0060.00616.99
8.0.150.0000.00716.81
8.0.140.0040.00416.81
8.0.130.0060.00013.30
8.0.120.0000.00716.81
8.0.110.0050.00316.87
8.0.100.0030.00516.96
8.0.90.0040.00416.89
8.0.80.0000.01416.82
8.0.70.0070.00016.73
8.0.60.0000.00716.71
8.0.50.0070.00016.75
8.0.30.0140.00616.91
8.0.20.0110.01017.40
8.0.10.0040.00416.81
8.0.00.0130.00616.85
7.4.330.0020.00216.63
7.4.320.0030.00316.57
7.4.300.0060.00016.60
7.4.290.0030.00316.41
7.4.280.0000.00716.42
7.4.270.0000.00816.41
7.4.260.0000.00716.50
7.4.250.0030.00316.57
7.4.240.0040.00316.57
7.4.230.0000.00716.58
7.4.220.0090.00916.66
7.4.210.0030.01416.51
7.4.200.0070.00016.63
7.4.160.0130.00616.53
7.4.150.0120.00617.40
7.4.140.0070.00917.86
7.4.130.0070.01016.40
7.4.120.0120.00716.46
7.4.110.0100.01016.51
7.4.100.0130.00316.41
7.4.90.0130.01616.38
7.4.80.0090.00919.39
7.4.70.0160.00316.74
7.4.60.0100.00616.43
7.4.50.0070.01016.47
7.4.40.0090.00916.30
7.4.30.0070.01116.49
7.4.10.0100.00615.23
7.4.00.0080.00814.94
7.3.330.0100.00013.33
7.3.320.0000.00613.33
7.3.310.0000.00716.35
7.3.300.0000.00716.23
7.3.290.0070.01416.30
7.3.280.0100.00616.31
7.3.270.0090.00917.40
7.3.260.0120.01316.40
7.3.250.0100.00916.47
7.3.240.0100.01016.41
7.3.230.0080.00816.50
7.3.210.0090.01316.23
7.3.200.0000.01516.68
7.3.190.0070.01416.70
7.3.180.0070.01016.28
7.3.170.0030.01916.62
7.3.160.0140.00316.66
7.3.130.0090.00914.91
7.3.120.0090.00914.87
7.3.110.0100.00714.95
7.3.100.0080.00814.97
7.3.90.0100.00314.83
7.3.80.0000.00815.10
7.3.70.0080.00414.51
7.3.60.0000.01014.89
7.3.50.0130.00314.74
7.3.40.0060.00614.74
7.3.30.0060.00914.62
7.3.20.0060.00616.69
7.3.10.0080.00816.81
7.3.00.0090.01016.70
7.2.330.0150.00516.77
7.2.320.0150.00916.65
7.2.310.0140.00316.81
7.2.300.0030.01316.50
7.2.290.0030.01416.61
7.2.260.0070.01014.85
7.2.250.0100.00715.20
7.2.240.0040.01114.73
7.2.230.0030.01315.29
7.2.220.0030.01214.91
7.2.210.0030.00715.01
7.2.200.0090.00615.06
7.2.190.0000.01715.19
7.2.180.0000.01315.10
7.2.170.0080.00315.18
7.2.160.0080.00815.01
7.2.150.0100.00317.08
7.2.140.0030.00616.93
7.2.130.0110.00516.93
7.2.120.0090.00916.93
7.2.110.0100.00516.58
7.2.100.0050.01116.98
7.2.90.0090.00516.91
7.2.80.0060.00816.86
7.2.70.0050.00816.96
7.2.60.0060.00916.84
7.2.50.0080.00817.00
7.2.40.0090.00716.80
7.2.30.0040.01017.00
7.2.20.0110.00517.00
7.2.10.0100.00716.86
7.2.00.0070.00716.95
7.1.330.0000.01516.06
7.1.320.0030.01215.70
7.1.310.0000.01415.90
7.1.300.0060.00615.83
7.1.290.0120.00315.71
7.1.280.0080.00415.82
7.1.270.0030.00715.52
7.1.260.0040.01115.61
7.1.250.0060.00815.66
7.1.240.0060.00315.61
7.1.230.0070.00415.77
7.1.220.0090.00315.54
7.1.210.0110.00415.92
7.1.200.0010.01115.80
7.1.190.0040.01115.96
7.1.180.0090.00615.80
7.1.170.0030.01415.71
7.1.160.0030.00815.70
7.1.150.0000.01015.95
7.1.140.0060.00915.92
7.1.130.0060.00615.61
7.1.120.0090.00615.59
7.1.110.0050.01116.95
7.1.100.0100.00717.00
7.1.90.0040.01017.10
7.1.80.0060.00917.05
7.1.70.0060.00916.38
7.1.60.0170.00825.49
7.1.50.0140.01025.34
7.1.40.0140.01225.09
7.1.30.0120.01025.09
7.1.20.0080.01725.22
7.1.10.0080.00416.14
7.1.00.0080.00716.35
7.0.330.0060.00615.33
7.0.320.0000.01415.27
7.0.310.0100.00315.39
7.0.300.0040.01215.42
7.0.290.0030.00915.25
7.0.280.0120.00015.41
7.0.270.0090.00015.45
7.0.260.0070.00715.19
7.0.250.0090.00716.35
7.0.240.0050.01216.65
7.0.230.0100.00316.74
7.0.220.0080.00616.40
7.0.210.0080.00815.86
7.0.200.0070.00916.01
7.0.190.0050.01116.06
7.0.180.0050.01115.92
7.0.170.0060.00815.82
7.0.160.0080.00615.84
7.0.150.0020.01215.79
7.0.140.0070.00715.73
7.0.130.0070.00516.03
7.0.120.0060.01015.98
7.0.110.0080.00915.68
7.0.100.0050.00915.79
7.0.90.0060.00815.71
7.0.80.0080.01015.80
7.0.70.0070.00915.96
7.0.60.0090.00315.61
7.0.50.0070.00915.84
7.0.40.0030.01315.04
7.0.30.0060.01014.96
7.0.20.0040.01115.06
7.0.10.0020.00914.71
7.0.00.0050.00514.71
5.6.400.0040.01114.31
5.6.390.0000.01513.98
5.6.380.0100.00314.31
5.6.370.0040.00714.57
5.6.360.0110.00714.22
5.6.350.0110.00314.28
5.6.340.0060.00914.52
5.6.330.0070.00714.55
5.6.320.0080.00414.61
5.6.310.0070.00714.27
5.6.300.0040.01114.55
5.6.290.0000.01214.24
5.6.280.0040.01114.24
5.6.270.0160.00014.73
5.6.260.0060.00314.22
5.6.250.0030.01014.64
5.6.240.0080.00414.20
5.6.230.0030.01014.54
5.6.220.0070.00714.33
5.6.210.0090.00614.11
5.6.200.0120.00314.49
5.6.190.0090.00014.21
5.6.180.0030.01414.42
5.6.170.0110.00414.39
5.6.160.0070.00314.27
5.6.150.0100.00314.30
5.6.140.0000.01814.11
5.6.130.0060.00914.24
5.6.120.0090.00914.57
5.6.110.0110.00714.41
5.6.100.0140.00414.42
5.6.90.0060.01214.33
5.6.80.0080.00414.16
5.6.70.0030.00614.42
5.6.60.0050.00514.22
5.6.50.0070.00714.32
5.6.40.0090.00014.32
5.6.30.0070.00414.47
5.6.20.0030.00614.25
5.6.10.0040.01114.21
5.6.00.0050.00514.24

preferences:
56.73 ms | 400 KiB | 5 Q