From 366ee6381e44eda9c5e4c691e77674fb6bce2528 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 24 Jan 2025 23:32:36 +0100 Subject: Replace call_user_func_array with dynamic function call Use modern php syntax to call a callable. Reduce the stack trace to improve performance and better IDE and static analyzer Also replace func_get_args with variables Change-Id: Ie193c4e996ab136e08f1e16c988448d054520aa7 --- maintenance/includes/Benchmarker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'maintenance/includes') diff --git a/maintenance/includes/Benchmarker.php b/maintenance/includes/Benchmarker.php index 8fd44465212c..8004739b8112 100644 --- a/maintenance/includes/Benchmarker.php +++ b/maintenance/includes/Benchmarker.php @@ -122,7 +122,7 @@ abstract class Benchmarker extends Maintenance { } $t = microtime( true ); // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset False positive - call_user_func_array( $bench['function'], $bench['args'] ); + $bench['function']( ...$bench['args'] ); $t = ( microtime( true ) - $t ) * 1000; if ( $verbose ) { $this->verboseRun( $i ); -- cgit v1.2.3