3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [ 'admin' => [ 'user', 'changeUser', ], 'user' => [ 'guest', 'updatePassword', ], 'guest' => [ 'login', 'admin', ], ]; $role = 'admin'; $permissions = $a[$role]; $groups = []; $final = []; while (!empty($permissions)) { $permission = array_shift($permissions); if (in_array($permission, $groups)) { continue; } if (!empty($a[$permission])) { array_push($groups, $permission); array_push($permissions, ...$a[$permission]); } else { $final[] = $permission; } } var_export($final);

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.5.80.0060.00416.74
8.5.70.0180.00616.80
8.5.60.0160.00916.63
8.5.50.0210.00416.65
8.5.40.0220.00416.65
8.5.30.0190.00316.50
8.5.20.0180.00416.69
8.5.10.0130.00716.62
8.5.00.0070.00318.30
8.4.230.0150.00619.52
8.4.220.0140.00519.62
8.4.210.0180.00419.35
8.4.200.0190.00519.49
8.4.190.0160.00619.54
8.4.180.0150.00719.74
8.4.170.0150.00519.61
8.4.160.0170.00319.55
8.4.150.0170.00519.53
8.4.140.0200.00217.38
8.4.130.0160.00517.70
8.4.120.0190.00417.60
8.4.110.0150.00517.77
8.4.100.0190.00317.85
8.4.90.0160.00617.77
8.4.80.0180.00717.87
8.4.70.0170.00617.79
8.4.60.0210.00517.59
8.4.50.0210.00317.76
8.4.40.0200.00617.72
8.4.30.0180.00717.51
8.4.20.0220.00417.75
8.4.10.0200.00317.77
8.3.320.0050.00618.62
8.3.310.0130.00718.18
8.3.300.0170.00218.32
8.3.290.0150.00418.17
8.3.280.0180.00518.26
8.3.270.0200.00116.67
8.3.260.0170.00516.62
8.3.250.0180.00416.74
8.3.240.0150.00716.71
8.3.230.0180.00616.52
8.3.220.0200.00316.63
8.3.210.0160.00616.51
8.3.200.0150.00616.51
8.3.190.0180.00516.49
8.3.180.0200.00316.62
8.3.170.0190.00316.53
8.3.160.0180.00716.35
8.3.150.0220.00216.58
8.3.140.0220.00216.68
8.3.130.0170.00416.65
8.3.120.0150.00316.65
8.3.110.0090.00416.70
8.3.100.0160.00516.68
8.3.90.0190.00416.39
8.3.80.0190.00416.45
8.3.70.0170.00717.05
8.3.60.0150.00916.65
8.3.50.0170.00716.73
8.3.40.0210.00217.80
8.3.30.0130.00617.83
8.3.20.0120.00617.85
8.3.10.0120.00617.73
8.3.00.0150.00317.71
8.2.320.0160.00317.88
8.2.310.0160.00217.80

preferences:
49.31 ms | 767 KiB | 5 Q