- // Allow closures in PHP 5.3+
- if ( is_object( $func ) && $func instanceof Closure ) {
- $profName = $fname . '-extensions-closure';
- } elseif ( is_array( $func ) ) {
- if ( is_object( $func[0] ) ) {
- $profName = $fname . '-extensions-' . get_class( $func[0] ) . '::' . $func[1];
- } else {
- $profName = $fname . '-extensions-' . implode( '::', $func );
- }
- } else {
- $profName = $fname . '-extensions-' . strval( $func );
- }
-
- $ps_ext_func = Profiler::instance()->scopedProfileIn( $profName );