<?php
$s['longDescription'] = 'replace these ***** not this* and *** this ** ****';
$blurb = preg_replace_callback("/(?:(?<=\*)|(?=\*\*))\*/", "★", $s['longDescription']);
echo $blurb;
Fatal error: Uncaught TypeError: preg_replace_callback(): Argument #2 ($callback) must be a valid callback, function "★" not found or invalid function name in /in/BlgsL:3
Stack trace:
#0 /in/BlgsL(3): preg_replace_callback('/(?:(?<=\\*)|(?=...', '★', 'replace these *...')
#1 {main}
thrown in /in/BlgsL on line 3
Process exited with code 255.
Warning: preg_replace_callback(): Requires argument 2, '★', to be a valid callback in /in/BlgsL on line 3
replace these ***** not this* and *** this ** ****
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Warning: preg_replace_callback(): requires argument 2, '★', to be a valid callback in /in/BlgsL on line 3
replace these ***** not this* and *** this ** ****
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9
Warning: preg_replace_callback() requires argument 2, '★', to be a valid callback in /in/BlgsL on line 3
replace these ***** not this* and *** this ** ****