PHPverse 2025

Voting

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

The Note You're Voting On

boukeversteegh at gmail dot com
14 years ago
The $pattern argument doesn't use /pattern/ delimiters, unlike other regex functions such as preg_match.

<?php
# Works. No slashes around the /pattern/
print_r( mb_split("\s", "hello world") );
Array (
[
0] => hello
[1] => world
)

# Doesn't work:
print_r( mb_split("/\s/", "hello world") );
Array (
[
0] => hello world
)
?>

<< Back to user notes page

To Top