public static function PHPUnit_Util_Regex::pregMatchSafe in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Util/Regex.php \PHPUnit_Util_Regex::pregMatchSafe()
4 calls to PHPUnit_Util_Regex::pregMatchSafe()
- PHPUnit_Framework_Constraint_ExceptionMessageRegExp::matches in vendor/
phpunit/ phpunit/ src/ Framework/ Constraint/ ExceptionMessageRegExp.php - Evaluates the constraint for parameter $other. Returns true if the constraint is met, false otherwise.
- PHPUnit_Runner_Filter_Test::setFilter in vendor/
phpunit/ phpunit/ src/ Runner/ Filter/ Test.php - Util_RegexTest::testInvalidRegex in vendor/
phpunit/ phpunit/ tests/ Util/ RegexTest.php - @dataProvider invalidRegexpProvider @covers PHPUnit_Util_Regex::pregMatchSafe
- Util_RegexTest::testValidRegex in vendor/
phpunit/ phpunit/ tests/ Util/ RegexTest.php - @dataProvider validRegexpProvider @covers PHPUnit_Util_Regex::pregMatchSafe
File
- vendor/
phpunit/ phpunit/ src/ Util/ Regex.php, line 18
Class
- PHPUnit_Util_Regex
- Error handler that converts PHP errors and warnings to exceptions.
Code
public static function pregMatchSafe($pattern, $subject, $matches = null, $flags = 0, $offset = 0) {
$handler_terminator = PHPUnit_Util_ErrorHandler::handleErrorOnce(E_WARNING);
$match = preg_match($pattern, $subject, $matches, $flags, $offset);
$handler_terminator();
// cleaning
return $match;
}