Skip to main content

@Friendica Developers

is there a way to call in array_walk() a callback static function/method which is inside a class? I tried array_walk($arr_tags, array('ParseUrl', 'arrAddHashes')); (it should use ParseUrl::arrAddHashes() as callback) but it doesn't work
array_walk($arr_tags, 'ParseUrl::arrAddHashes');
Although the actual callback function should have this form:
function callback(&$value[, $key]) {
    // Processing
    $value = $new_value;
If you want to work with a function that returns the result instead of modifying the parameters, array_map is more indicated.
This was my first try. But it doesn't seem to work :-(
I sucessfully tested this in PHPFiddle Lite, but I didn't check the PHP version. Could you be more specific about your own PHP version?

Edit: PHP Fiddle Lite version is 5.6.18