PHP 8.5.0 RC 1 available for testing

Voting

: six plus two?
(Example: nine)

The Note You're Voting On

workhorse at op dot pl
14 years ago
Preg_match returns empty result trying to validate $subject with carriege returns (/n/r).
To solve it one need to use /s modifier in $pattern string.
<?php
$pattern
='/.*/s';
$valid=preg_match($pattern, $subject, $match);
?>

<< Back to user notes page

To Top