3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // on a besoin de recuperer ce qu'il y a entre () par exemple : dskjdslkjds (13254) preg_match_all('/\(([\d]+)\)/','dsdsq',$matches); var_dump(preg_match_all('/\(([\d]+)\)/','dsdsq',$matches)); preg_match_all('/\(([\d]+)\)/','dsdsds(12345)',$matches); var_dump($matches); preg_match_all('/\(([\d]+)\)/',NULL,$matches); var_dump($matches);
Output for 4.3.0 - 7.1.0
int(0) array(2) { [0]=> array(1) { [0]=> string(7) "(12345)" } [1]=> array(1) { [0]=> string(5) "12345" } } array(2) { [0]=> array(0) { } [1]=> array(0) { } }