3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [ 'main' => [ 'number1' => '9000.99', 'number2' => 'nonono' ] ]; $arr2 = [ 'key1' => ['number1','b','c'] ]; function read($arr, $arr2) { foreach ($arr as $key => $value) { if (is_array($value)) { read($value, $arr2); } else { echo $key; foreach($arr2 as $action) { var_dump($action); if(array_key_exists($key, array_flip($action))){ echo $value; } } } } } read($arr1, $arr2);

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.20.0030.01619.39
8.4.10.0100.00017.53
8.3.150.0070.01117.29
8.3.140.0000.00816.57
8.3.130.0030.00516.78
8.3.120.0060.00320.71
8.3.110.0040.00420.94
8.3.100.0030.00516.63
8.3.90.0080.00026.77
8.3.80.0040.00416.75
8.3.70.0140.00716.58
8.3.60.0060.01218.43
8.3.50.0090.00618.28
8.3.40.0150.00018.97
8.3.30.0070.01118.84
8.3.20.0000.00821.75
8.3.10.0060.00321.77
8.3.00.0090.00019.56
8.2.270.0000.01917.33
8.2.260.0030.00616.58
8.2.250.0000.00916.91
8.2.240.0040.00417.08
8.2.230.0030.01322.58
8.2.220.0080.00024.06
8.2.210.0060.00326.77
8.2.200.0030.00618.54
8.2.190.0140.00716.58
8.2.180.0090.00625.92
8.2.170.0140.00422.96
8.2.160.0100.00621.14
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0000.00719.33
8.2.120.0050.00326.35
8.2.110.0140.00322.38
8.2.100.0060.00617.97
8.2.90.0040.00418.34
8.2.80.0040.00418.05
8.2.70.0030.00518.16
8.2.60.0040.00417.93
8.2.50.0000.00818.28
8.2.40.0050.00320.55
8.2.30.0070.00019.38
8.2.20.0040.00418.15
8.2.10.0050.00218.07
8.2.00.0050.00218.05
8.1.310.0030.00516.53
8.1.300.0120.00618.65
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0080.00023.68
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00923.91
8.1.230.0060.00622.63
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0050.00317.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.25
8.1.160.0020.00518.81
8.1.150.0040.00419.06
8.1.140.0000.00717.59
8.1.130.0000.00717.43
8.1.120.0050.00317.37
8.1.110.0070.00017.38
8.1.100.0070.00017.46
8.1.90.0040.00417.45
8.1.80.0030.00517.41
8.1.70.0040.00417.39
8.1.60.0000.01017.62
8.1.50.0030.00617.54
8.1.40.0040.00417.52
8.1.30.0050.00317.61
8.1.20.0040.00417.63
8.1.10.0030.00517.58
8.1.00.0030.00617.49
8.0.300.0000.00722.08
8.0.290.0020.00516.75
8.0.280.0000.00718.47
8.0.270.0040.00417.31
8.0.260.0000.00816.83
8.0.250.0070.00016.86
8.0.240.0030.00316.96
8.0.230.0070.00316.82
8.0.220.0070.00016.89
8.0.210.0050.00316.93
8.0.200.0000.00716.92
8.0.190.0000.00816.95
8.0.180.0080.00016.93
8.0.170.0040.00416.94
8.0.160.0000.00716.91
8.0.150.0030.00316.70
8.0.140.0040.00416.82
8.0.130.0050.00013.31
8.0.120.0040.00416.86
8.0.110.0050.00316.73
8.0.100.0040.00416.77
8.0.90.0050.00216.85
8.0.80.0060.01016.83
8.0.70.0050.00216.84
8.0.60.0000.00716.84
8.0.50.0030.00516.74
8.0.30.0070.01017.14
8.0.20.0120.01417.40
8.0.10.0080.00017.05
8.0.00.0110.00716.71
7.4.330.0000.00415.55
7.4.320.0000.00716.61
7.4.300.0030.00316.61
7.4.290.0030.00316.41
7.4.280.0000.00816.48
7.4.270.0040.00716.59
7.4.260.0030.00316.39
7.4.250.0040.00416.47
7.4.240.0000.00716.37
7.4.230.0030.00316.61
7.4.220.0030.00616.58
7.4.210.0090.00916.61
7.4.200.0000.00716.61
7.4.160.0080.00916.50
7.4.140.0110.00717.86
7.4.130.0030.01516.58
7.4.120.0060.01316.56
7.4.110.0140.00316.48
7.4.100.0100.00616.48
7.4.90.0070.01516.56
7.4.80.0100.01319.39
7.4.70.0080.00816.71
7.4.60.0060.01316.30
7.4.50.0070.00716.45
7.4.40.0170.00016.66
7.4.10.0100.01016.34
7.4.00.0060.01215.43
7.3.330.0050.00013.16
7.3.320.0060.00013.15
7.3.310.0070.00016.26
7.3.300.0030.00316.21
7.3.290.0000.00716.17
7.3.280.0120.00816.28
7.3.260.0080.01216.43
7.3.240.0090.00816.36
7.3.230.0060.01216.57
7.3.210.0170.00616.34
7.3.200.0060.01216.61
7.3.190.0110.00616.50
7.3.180.0040.01216.32
7.3.170.0090.00616.29
7.3.160.0070.01016.33
7.3.130.0030.01616.35
7.3.120.0060.01315.62
7.3.110.0040.01115.63
7.3.100.0060.00915.73
7.3.90.0090.00415.49
7.3.80.0030.01215.73
7.3.70.0110.00315.50
7.3.60.0080.00615.45
7.3.50.0050.00815.52
7.3.40.0050.00915.43
7.3.30.0050.00415.47
7.3.20.0040.00917.35
7.3.10.0020.00817.33
7.3.00.0090.00717.28
7.2.330.0180.00716.62
7.2.320.0160.00816.69
7.2.310.0170.00716.73
7.2.300.0130.01016.55
7.2.290.0140.01116.57
7.2.260.0060.01516.20
7.2.250.0090.01115.73
7.2.240.0040.01215.76
7.2.230.0070.00815.73
7.2.220.0090.00515.82
7.2.210.0100.00215.51
7.2.200.0060.00815.64
7.2.190.0050.00815.67
7.2.180.0080.00615.66
7.2.170.0070.00415.78
7.2.160.0030.00616.46
7.2.150.0080.00818.27
7.2.140.0030.01418.39
7.2.130.0060.00618.34
7.2.120.0150.00018.59
7.2.110.0090.01218.34
7.2.100.0040.01518.46
7.2.90.0040.00718.41
7.2.80.0050.01017.50
7.2.70.0070.01018.68
7.2.60.0030.01117.61
7.2.50.0070.00417.56
7.2.40.3030.01317.84
7.2.30.0090.01317.83
7.2.20.0110.01018.01
7.2.10.0080.00917.85
7.2.00.2190.01418.01
7.1.330.0070.00616.71
7.1.320.0070.00516.59
7.1.310.0080.00516.64
7.1.300.0040.00716.68
7.1.290.0110.00416.52
7.1.280.0080.00616.59
7.1.270.0070.00516.62
7.1.260.0050.00716.52
7.1.250.0030.00717.25
7.1.240.0090.00617.28
7.1.230.0030.00717.45
7.1.220.0030.00917.41
7.1.210.0000.01117.48
7.1.200.0090.00516.55
7.1.190.0130.00317.31
7.1.180.0030.01017.49
7.1.170.0030.00717.30
7.1.160.0120.01116.95
7.1.150.0090.01216.69
7.1.140.0140.01217.00
7.1.130.0070.01317.03
7.1.120.2220.01116.67
7.1.110.3160.00916.67
7.1.100.0070.00916.84
7.1.90.0560.01116.77
7.1.80.0100.00816.71
7.1.70.0080.00916.18
7.1.60.0230.01125.10
7.1.50.0170.01125.14
7.1.40.1220.00924.99
7.1.30.0200.00824.99
7.1.20.3040.01425.06
7.1.10.4440.01016.13
7.1.00.4180.01116.23
7.0.330.0040.00716.85
7.0.320.0100.00316.83
7.0.310.0060.01317.01
7.0.300.0030.01017.02
7.0.290.0030.01416.99
7.0.280.0120.00017.03
7.0.270.0060.00616.82
7.0.260.0030.01016.91
7.0.250.0000.01616.63
7.0.240.0030.00617.04
7.0.230.0040.01116.95
7.0.220.0040.00816.99
7.0.210.0060.00917.05
7.0.200.0070.00417.03
7.0.190.0100.00316.63
7.0.180.0000.01117.08
7.0.170.0060.00616.99
7.0.160.0080.00317.01
7.0.150.0100.00716.99
7.0.140.0000.01016.98
7.0.130.0040.00717.13
7.0.120.0030.00616.89
7.0.110.0040.01217.11
7.0.100.0090.00616.89
7.0.90.0060.01017.11
7.0.80.0040.00816.97
7.0.70.0150.00016.96
7.0.60.0000.00916.98
7.0.50.0060.00617.03
7.0.40.0090.00314.93
7.0.30.0030.00614.90
7.0.20.0090.00315.09
7.0.10.0100.00615.04
7.0.00.0000.01315.00
5.6.400.0060.00315.95
5.6.390.0090.00616.04
5.6.380.0060.00615.53
5.6.370.0090.01015.87
5.6.360.0050.00515.93
5.6.350.0030.01015.86
5.6.340.0060.00915.59
5.6.330.0040.01115.86
5.6.320.0140.00416.10
5.6.310.0070.01015.71
5.6.300.0110.00415.85
5.6.290.0030.01016.09
5.6.280.0100.00016.13
5.6.270.0090.00916.02
5.6.260.0130.00315.91
5.6.250.0000.01715.72
5.6.240.0040.01215.83
5.6.230.0000.01715.88
5.6.220.0030.00915.91
5.6.210.0030.00715.67
5.6.200.0060.00616.00
5.6.190.0070.00715.72
5.6.180.0070.00415.77
5.6.170.0070.01015.71
5.6.160.0040.01115.64
5.6.150.0030.00715.83
5.6.140.0030.00915.84
5.6.130.0030.00615.90
5.6.120.0060.00315.79
5.6.110.0110.00015.66
5.6.100.0060.00615.98
5.6.90.0100.00315.90
5.6.80.0030.00615.68
5.6.70.0030.00615.73
5.6.60.0030.00615.69
5.6.50.0070.00715.83
5.6.40.0060.00615.56
5.6.30.0070.00415.89
5.6.20.0110.00415.81
5.6.10.0030.01015.72
5.6.00.0030.00615.86

preferences:
56.83 ms | 403 KiB | 5 Q