3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $params = array('a', 'b', 'c'); $patterns = array_fill(0, count($params), '#\?#'); $replacements = $params; var_dump(preg_replace($patterns, $replacement, 'bla ? bla ? bla ? blu'));
based on jWOoV
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: replacement in /in/TXQS7 on line 6 string(18) "bla bla bla blu"
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: replacement in /in/TXQS7 on line 6 string(18) "bla bla bla blu"