Created
October 6, 2014 08:47
-
-
Save salathe/4b74ab41be52710f692a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[peter@Bibracte php-src.git (pull-request/865 *)]$ cat foo.php | |
<?php | |
$array = new ArrayIterator(array('a', array('b', 'c'))); | |
$regex = new RegexIterator($array, '/banana/'); | |
foreach ($regex as $match) { | |
var_dump($match); | |
} | |
[peter@Bibracte php-src.git (pull-request/865 *)]$ ./sapi/cli/php foo.php | |
array(2) { | |
[0]=> | |
string(1) "b" | |
[1]=> | |
string(1) "c" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment