https://bugzilla.wikimedia.org/show_bug.cgi?id=63049

--- Comment #3 from Darren Stephens <dar...@gestaltweb.me.uk> ---
Here we are, as requested:

// Armor links (bug 61362)
$masked = array();
$text = preg_replace_callback( '#<a .*?</a>#', function ( $matches ) use (
&$masked ) {
    $sha = sha1( $matches[0] );
    $masked[$sha] = $matches[0];
    return "<$sha>";
    }, $text );

// identify URLs
$protos = wfUrlProtocolsWithoutProtRel();

And yes, the callback does appear to include an anonymous function. Can also
corroborate Knual's interpretation of PHP docs  - anonymous functions only
became available in PHP 5.3.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to