3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'REXEL : Votre dossier Primexel n°@ref_dossier@ expire le @date_expiration@'; preg_match_all('/@([^@]+)@/i', $str, $matches, PREG_OFFSET_CAPTURE); var_dump($matches);
Output for 4.3.3 - 7.1.0
array(2) { [0]=> array(2) { [0]=> array(2) { [0]=> string(13) "@ref_dossier@" [1]=> int(34) } [1]=> array(2) { [0]=> string(17) "@date_expiration@" [1]=> int(58) } } [1]=> array(2) { [0]=> array(2) { [0]=> string(11) "ref_dossier" [1]=> int(35) } [1]=> array(2) { [0]=> string(15) "date_expiration" [1]=> int(59) } } }
Output for 4.3.0 - 4.3.2
Warning: Wrong value for parameter 4 in call to preg_match_all() in /in/55crD on line 3 NULL