Merge "Enable/disable Special:Block widgets according to block parameters"
[lhc/web/wiklou.git] / includes / profiler / ProfilerXhprof.php
index 9c96661..55a5a1f 100644 (file)
  * ($wgProfiler['exclude']) containing an array of function names.
  * Shell-style patterns are also accepted.
  *
- * It is also possible to use the Tideways PHP extension, which is mostly
- * a drop-in replacement for Xhprof. Just change the XHPROF_FLAGS_* constants
- * to TIDEWAYS_FLAGS_*.
+ * This also supports Tideways-XHProf PHP extension, which is mostly a drop-in
+ * replacement for Xhprof (replace XHPROF_FLAGS_* with XHPROF_TIDEWAYS_FLAGS_*),
+ * as well as the older (discontinued) Tideways extension (TIDEWAYS_FLAGS_*).
  *
  * @copyright © 2014 Wikimedia Foundation and contributors
  * @ingroup Profiler
  * @see Xhprof
  * @see https://php.net/xhprof
  * @see https://github.com/facebook/hhvm/blob/master/hphp/doc/profiling.md
- * @see https://github.com/tideways/php-profiler-extension
+ * @see https://github.com/tideways/php-xhprof-extension
  */
 class ProfilerXhprof extends Profiler {
        /**
@@ -73,7 +73,7 @@ class ProfilerXhprof extends Profiler {
        public function __construct( array $params = [] ) {
                parent::__construct( $params );
 
-               $flags = isset( $params['flags'] ) ? $params['flags'] : 0;
+               $flags = $params['flags'] ?? 0;
                $options = isset( $params['exclude'] )
                        ? [ 'ignored_functions' => $params['exclude'] ] : [];
                Xhprof::enable( $flags, $options );