<?php
namespace pcre\preg_replace_callback_001;

function f() {
	echo preg_replace_callback('~-([a-z])~', function ($match) {
		return strtoupper($match[1]);
	}, 'hello-world');
}

f();

<?php
namespace pcre\preg_replace_callback_001;

function f() {
	echo preg_replace_callback('~-([a-z])~', function ($match) {
    echo "callback\n";
		return strtoupper($match[1]);
	}, 'hello-world');
}

f();

Make preg_replace_callback test more thorough
Make preg_replace_callback test more thorough

Check that the callback isn't called more than once, see #666
