3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s['longDescription'] = 'replace these ***** not this* and *** this ** ****'; $blurb = preg_replace_callback("/(?:(?<=\*)|(?=\*\*))\*/", "&#9733;", $s['longDescription']); echo $blurb;
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace_callback(): Requires argument 2, '&#9733;', to be a valid callback in /in/BlgsL on line 3 replace these ***** not this* and *** this ** ****
Output for hhvm-3.10.0 - 3.13.2
Warning: Not a valid callback function &#9733; in /in/BlgsL on line 3
Output for 5.0.0 - 5.1.6
Warning: preg_replace_callback(): requires argument 2, '&#9733;', to be a valid callback in /in/BlgsL on line 3 replace these ***** not this* and *** this ** ****
Output for 4.3.0 - 4.4.9
Warning: preg_replace_callback() requires argument 2, '&#9733;', to be a valid callback in /in/BlgsL on line 3 replace these ***** not this* and *** this ** ****