Voting

: max(six, seven)?
(Example: nine)

The Note You're Voting On

Anonymous
3 years ago
One of the differences between preg_match() & mb_ereg()
about "captured parenthesized subpattern".

<?php

preg_match
('/(abc)(.*)/', 'abc', $match);
var_dump($match);

mb_ereg('(abc)(.*)', 'abc', $match);
var_dump($match);

?>

array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
string(0) "" // <-- "string"(0) "" : preg_match()
}

array(3) {
[0]=>
string(3) "abc"
[1]=>
string(3) "abc"
[2]=>
bool(false) // <-- "bool"(false) : mb_ereg()
}

<< Back to user notes page

To Top