# flywp/v1.3/includes/Helper.php

FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel, version v1.3. 46 lines.

- Page: https://pluginprobe.com/plugins/flywp/v1.3/code/includes/Helper.php
- Raw: https://pluginprobe.com/plugins/flywp/v1.3/raw/includes/Helper.php
- Modified: 2024-07-18T17:12:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/flywp/v1.3/code/includes/Helper.php#L10-L20`.

```php
<?php

namespace FlyWP;

class Helper {

    /**
     * Print_r with pre tags.
     *
     * @param mixed $var
     */
    public static function print_r( $var = null ) {
        echo '<pre>';
        print_r( $var );
        echo '</pre>';
    }

    /**
     * Var_dump and die.
     *
     * @param mixed $var
     */
    public static function dd( $var = null ) {
        self::print_r( $var );
        die();
    }

    /**
     * Check if server is running Nginx.
     *
     * @return bool
     */
    public static function is_nginx() {
        return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'nginx' );
    }

    /**
     * Check if server is running LiteSpeed.
     *
     * @return bool
     */
    public static function is_litespeed() {
        return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'LiteSpeed' );
    }
}

```
