Merge "Remove hphpc support and deprecate related functions"
[lhc/web/wiklou.git] / includes / profiler / ProfilerSimpleUDP.php
index abefa81..9204763 100644 (file)
@@ -41,16 +41,16 @@ class ProfilerSimpleUDP extends ProfilerSimple {
                        return;
                }
 
-               if ( !MWInit::functionExists( 'socket_create' ) ) {
+               if ( !function_exists( 'socket_create' ) ) {
                        # Sockets are not enabled
                        return;
                }
 
-               $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
+               $sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
                $plength = 0;
                $packet = "";
                foreach ( $this->mCollated as $entry => $pfdata ) {
-                       if( !isset( $pfdata['count'] )
+                       if ( !isset( $pfdata['count'] )
                                || !isset( $pfdata['cpu'] )
                                || !isset( $pfdata['cpu_sq'] )
                                || !isset( $pfdata['real'] )
@@ -58,7 +58,7 @@ class ProfilerSimpleUDP extends ProfilerSimple {
                                continue;
                        }
                        $pfline = sprintf( "%s %s %d %f %f %f %f %s\n", $this->getProfileID(), "-", $pfdata['count'],
-                               $pfdata['cpu'], $pfdata['cpu_sq'], $pfdata['real'], $pfdata['real_sq'], $entry);
+                               $pfdata['cpu'], $pfdata['cpu_sq'], $pfdata['real'], $pfdata['real_sq'], $entry );
                        $length = strlen( $pfline );
                        /* printf("<!-- $pfline -->"); */
                        if ( $length + $plength > 1400 ) {