3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); echo preg_match_all( "/world/", "Hello, world! yes i just said world", $a, PREG_OFFSET_CAPTURE ); var_dump($a);
based on BeNUp
Output for 4.3.3 - 7.2.0
2array(1) { [0]=> array(2) { [0]=> array(2) { [0]=> string(5) "world" [1]=> int(7) } [1]=> array(2) { [0]=> string(5) "world" [1]=> int(30) } } }
Output for 4.3.0 - 4.3.2
Warning: Wrong value for parameter 4 in call to preg_match_all() in /in/oLgsj on line 3 array(0) { }