PHP Conference Kansai 2025

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

jetsoft at iinet.net.au
20 years ago
To clarify the "limit" parameter and the PREG_SPLIT_DELIM_CAPTURE option,

<?php
$preg_split
('(/ /)', '1 2 3 4 5 6 7 8', 4 ,PREG_SPLIT_DELIM_CAPTURE );
?>

returns:

('1', ' ', '2', ' ' , '3', ' ', '4 5 6 7 8')

So you actually get 7 array items not 4

<< Back to user notes page

To Top