3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "list page.php?cpage=1, list page.php?cpage=2, list page.php?cpage=3 thats all"; //$string = str_replace("?cpage=", "/", $string); preg_match_all("/cpage=/", $string, $matches); foreach($matches[0] as $value) { echo $value . '<br />'; } echo $string; //hasil list page.php1, list page.php2, list page.php3 thats all //yg diinginkan list page.php/1/, list page.php/2/, list page.php/3/ thats all
based on KYrU4
Output for 5.3.19 - 7.2.0
cpage=<br />cpage=<br />cpage=<br />list page.php?cpage=1, list page.php?cpage=2, list page.php?cpage=3 thats all