3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [["b" => "loc04", "c" => ["administrator" => "administrator"]]]; $arr[] = ["b" => "loc23", "c" => ["administrator" => "administrator", "publisher" => "publisher"]]; $arr[] = ["b" => "loc12", "c" => ["publisher" => "publisher", "viewer" => "viewer"]]; $role = "administrator"; //$a = array_filter($arr, function ($e) use ($role) {return in_array($role, $e["c"]);}); $a = array_filter($arr, function ($e) use ($role) {return isset($e["c"][$role]);}); print_r($a);

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.120.0130.00720.60
8.4.110.0100.01122.69
8.4.100.0090.01117.63
8.4.90.0080.01222.46
8.4.80.0070.00318.91
8.4.70.0050.00319.15
8.4.60.0060.00620.71
8.4.50.0110.01020.46
8.4.40.0150.00917.65
8.4.30.0100.01020.64
8.4.20.0140.01418.45
8.4.10.0150.00419.35
8.3.250.0130.00618.78
8.3.240.0050.00316.61
8.3.230.0080.00816.74
8.3.220.0120.00518.97
8.3.210.0140.00518.54
8.3.200.0070.00116.94
8.3.190.0060.00417.27
8.3.180.0120.00720.77
8.3.170.0040.00417.29
8.3.160.0160.00317.06
8.3.150.0110.00816.47
8.3.140.0070.00718.07
8.3.130.0090.00618.35
8.3.120.0080.00318.85
8.3.110.0030.00620.94
8.3.100.0030.00524.06
8.3.90.0040.00426.77
8.3.80.0040.00416.75
8.3.70.0110.00716.75
8.3.60.0110.00418.43
8.3.50.0090.00517.28
8.3.40.0120.00318.84
8.3.30.0120.00318.93
8.3.20.0030.00720.89
8.3.10.0070.00023.47
8.3.00.0040.00420.93
8.2.290.0140.00516.89
8.2.280.0120.00819.99
8.2.270.0130.00616.75
8.2.260.0040.00417.18
8.2.250.0030.00718.30
8.2.240.0130.00317.41
8.2.230.0070.00322.58
8.2.220.0030.00637.54
8.2.210.0110.00726.77
8.2.200.0070.00318.41
8.2.190.0030.01416.58
8.2.180.0040.01425.92
8.2.170.0150.00018.97
8.2.160.0070.00722.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00018.22
8.2.120.0080.00026.35
8.2.110.0040.00819.27
8.2.100.0090.00317.87
8.2.90.0080.00017.63
8.2.80.0000.00817.97
8.2.70.0080.00018.03
8.2.60.0030.00519.95
8.2.50.0030.00618.10
8.2.40.0040.00419.47
8.2.30.0000.00719.38
8.2.20.0050.00318.07
8.2.10.0040.00419.21
8.2.00.0000.00818.30
8.1.330.0060.00516.16
8.1.320.0090.01016.41
8.1.310.0160.00016.62
8.1.300.0000.00816.36
8.1.290.0080.00430.84
8.1.280.0070.01125.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0070.01128.09
8.1.240.0060.00323.92
8.1.230.0080.00319.16
8.1.220.0050.00317.79
8.1.210.0030.00518.77
8.1.200.0070.00317.36
8.1.190.0030.00517.24
8.1.180.0000.00818.10
8.1.170.0030.00618.46
8.1.160.0000.00718.84
8.1.150.0030.00518.96
8.1.140.0030.00319.07
8.1.130.0030.00318.91
8.1.120.0000.00717.38
8.1.110.0040.00417.40
8.1.100.0100.00017.49
8.1.90.0000.00817.50
8.1.80.0000.00817.33
8.1.70.0080.00017.41
8.1.60.0030.00617.48
8.1.50.0040.00417.58
8.1.40.0060.00317.49
8.1.30.0030.00617.55
8.1.20.0070.00417.52
8.1.10.0000.00717.65
8.1.00.0030.00517.52
8.0.300.0000.00721.34
8.0.290.0000.00816.63
8.0.280.0040.00418.41
8.0.270.0000.00716.75
8.0.260.0030.00318.51
8.0.250.0040.00416.89
8.0.240.0070.00016.94
8.0.230.0020.00516.93
8.0.220.0030.00316.88
8.0.210.0000.00716.85
8.0.200.0040.00417.02
8.0.190.0030.00316.98
8.0.180.0030.00616.84
8.0.170.0000.00916.90
8.0.160.0030.00616.99
8.0.150.0070.00316.81
8.0.140.0030.00316.84
8.0.130.0000.00513.36
8.0.120.0040.00416.89
8.0.110.0080.00016.88
8.0.100.0040.00416.87
8.0.90.0050.00217.01
8.0.80.0090.00816.86
8.0.70.0070.00016.77
8.0.60.0040.00416.88
8.0.50.0030.00516.76
8.0.30.0110.01117.20
8.0.20.0140.01517.04
8.0.10.0040.00416.88
8.0.00.0130.00816.80
7.4.330.0060.00016.64
7.4.320.0040.00416.41
7.4.300.0030.00316.39
7.4.290.0000.00716.41
7.4.280.0000.00816.41
7.4.270.0070.00016.56
7.4.260.0040.00416.49
7.4.250.0030.00316.57
7.4.240.0000.00916.54
7.4.230.0030.00316.30
7.4.220.0040.00416.52
7.4.210.0030.01116.58
7.4.200.0030.00516.61
7.4.160.0080.01016.54
7.4.140.0030.01617.86
7.4.130.0110.00616.60
7.4.120.0070.01016.64
7.4.110.0130.00316.56
7.4.100.0110.00716.59
7.4.90.0110.00616.54
7.4.80.0120.00619.39
7.4.70.0220.01516.34
7.4.60.0090.00616.49
7.4.50.0030.01016.49
7.4.40.0060.01216.57
7.4.10.0150.00414.79
7.4.00.0060.01014.96
7.3.330.0020.00213.37
7.3.320.0000.00513.38
7.3.310.0030.00316.38
7.3.300.0000.00716.37
7.3.290.0060.00816.38
7.3.280.0060.00916.35
7.3.260.0080.00916.42
7.3.240.0070.01216.40
7.3.230.0150.00316.39
7.3.210.0090.00916.46
7.3.200.0070.01116.59
7.3.190.0130.00316.28
7.3.180.0040.01116.27
7.3.170.0060.01016.52
7.3.160.0070.01016.34
7.3.130.0060.00614.83
7.3.120.0080.01114.85
7.3.110.0080.00914.82
7.3.100.0040.01014.72
7.3.90.0020.00914.74
7.3.80.0070.00714.88
7.3.70.0030.00914.64
7.3.60.0040.01114.73
7.3.50.0070.00614.73
7.3.40.0080.00614.51
7.3.30.0040.00714.67
7.3.20.0080.00516.38
7.3.10.0090.00816.39
7.3.00.0080.00516.56
7.2.330.0090.00916.78
7.2.320.0140.00316.41
7.2.310.0170.00716.84
7.2.300.0110.00416.46
7.2.290.0000.01816.44
7.2.260.0030.01615.01
7.2.250.0100.00714.82
7.2.240.0050.01214.82
7.2.230.0060.00814.98
7.2.220.0050.00714.83
7.2.210.0040.00915.06
7.2.200.0070.00514.88
7.2.190.0080.00815.04
7.2.180.0080.00915.08
7.2.170.0040.01214.93
7.2.160.0050.00814.64
7.2.150.0070.01216.64
7.2.140.0140.00516.73
7.2.130.0030.00816.57
7.2.120.0110.00316.68
7.2.110.0090.00416.64
7.2.100.0090.00616.60
7.2.90.0060.01016.81
7.2.80.0050.01016.49
7.2.70.0120.00916.55
7.2.60.0050.01316.91
7.2.50.0070.00716.66
7.2.40.0070.00616.56
7.2.30.0040.00816.93
7.2.20.0070.00516.59
7.2.10.0070.00816.70
7.2.00.0070.00716.70
7.1.330.0080.00615.56
7.1.320.0020.00915.70
7.1.310.0060.00715.83
7.1.300.0030.01015.78
7.1.290.0080.00515.60
7.1.280.0050.00715.64
7.1.270.0050.00615.64
7.1.260.0040.00915.87
7.1.250.0020.01215.68
7.1.240.0000.01015.41
7.1.230.0070.01015.51
7.1.220.0110.00415.58
7.1.210.0120.00615.74
7.1.200.0040.01215.79
7.1.190.0030.01415.75
7.1.180.0040.01115.78
7.1.170.0040.01115.78
7.1.160.0070.00715.51
7.1.150.0030.00615.77
7.1.140.0000.01315.88
7.1.130.0000.01315.72
7.1.120.0000.01215.77
7.1.110.0000.00915.99
7.1.100.0070.00715.77
7.1.90.0000.01315.74
7.1.80.0030.01015.97
7.1.70.0040.01115.97
7.1.60.0030.01015.80
7.1.50.0000.00915.96
7.1.40.0060.01015.46
7.1.30.0030.01015.59
7.1.20.0000.01515.49
7.1.10.0040.01215.71
7.1.00.0040.00715.55

preferences:
29.73 ms | 403 KiB | 5 Q