public static function createProcessControl()
    {
        switch (true) {
            case PosixProcessControl::isAvailable():
                return new PosixProcessControl();

            case WindowsProcessControl::isAvailable():
                return new WindowsProcessControl();

            case UnixProcessControl::isAvailable():
                return new UnixProcessControl();
        }

        throw new \Exception("No ProcessControl implementation available.");
    }
public static function createProcessControl()
    {
        switch (true) {
            case PosixProcessControl::isAvailable():
                return new PosixProcessControl();

            case WindowsProcessControl::isAvailable():
                return new WindowsProcessControl();

            case UnixProcessControl::isAvailable():
                return new UnixProcessControl();
        }

        throw new \Exception("No ProcessControl implementation available.");
    }
public static function createProcessControl ( ) { switch ( true ) { case PosixProcessControl :: isAvailable ( ) : return new PosixProcessControl ( ) ; case WindowsProcessControl :: isAvailable ( ) : return new WindowsProcessControl ( ) ; case UnixProcessControl :: isAvailable ( ) : return new UnixProcessControl ( ) ; } throw new \ Exception ( "No ProcessControl implementation available." ) ; }
Create a ProcessControl depending on available extensions and the underlying OS.

Check PosixProcessControl, WindowsProcessControl and UnixProcessControl, in that order.

@return ProcessControlInterface

@internal
Create a ProcessControl depending on available extensions and the underlying OS .