public static function confirm($msg)
    {
        echo $msg;
        $input = trim(fgets(STDIN));

        if (strtolower($input) == 'y' || strtolower($input) == 'yes') {
            return true;
        } else {
            return false;
        }
    }
public static function confirm($msg)
    {
        echo $msg;
        $input = trim(fgets(STDIN));

        if (strtolower($input) == 'y' || strtolower($input) == 'yes') {
            return true;
        } else {
            return false;
        }
    }
public static function confirm ( $ msg ) { echo $ msg ; $ input = trim ( fgets ( STDIN ) ) ; if ( strtolower ( $ input ) == 'y' || strtolower ( $ input ) == 'yes' ) { return true ; } else { return false ; } }
Add a confirmation

@param string $msg - question to ask

@static

@return bool - true if yes, false if anything else
Add a confirmation