From dff51fe19285c34afaef1a6d70285b9d885e2e18 Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Tue, 15 Nov 2016 08:06:31 -0800 Subject: [PATCH] Include mention that profiling intermediate hooks is broken in PHP7 --- inc/class-profiler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/class-profiler.php b/inc/class-profiler.php index a4965736..de3f8359 100644 --- a/inc/class-profiler.php +++ b/inc/class-profiler.php @@ -122,6 +122,10 @@ public function run() { */ public function wp_tick_profile_begin( $value = null ) { + if ( version_compare( PHP_VERSION, '7.0.0' ) >= 0 ) { + WP_CLI::error( "Profiling intermediate hooks is broken in PHP 7, see https://bugs.php.net/bug.php?id=72966" ); + } + // Disable opcode optimizers. These "optimize" calls out of the stack // and hide calls from the tick handler and backtraces. // Copied from P3 Profiler