DrewM\Morse\Morse::functionDisabled PHP 메소드

functionDisabled() 공개 정적인 메소드

Tests if the named function is present and enabled in the current environment.
public static functionDisabled ( string $functionName ) : boolean
$functionName string The name of the function to test.
리턴 boolean True if the function is disabled, false if it is available.
    public static function functionDisabled($functionName)
    {
        if (is_null(self::$disabledFunctions)) {
            self::populateDisabledFunctionsList();
        }
        if (in_array($functionName, self::$disabledFunctions)) {
            return true;
        }
        return false;
    }

Usage Example

예제 #1
0
파일: MorseTest.php 프로젝트: drewm/morse
 public function testDisabledFunction()
 {
     $result = Morse::functionDisabled('exec');
     $this->assertTrue($result === true || $result === false);
 }