Skip to content

Instantly share code, notes, and snippets.

@tinnet
Created December 13, 2011 16:46
Show Gist options
  • Save tinnet/1472866 to your computer and use it in GitHub Desktop.
Save tinnet/1472866 to your computer and use it in GitHub Desktop.
using namespaces to override global functions(?)
<?php
namespace FOO;
function strlen($arg) {
return 42;
}
// "my" strlen
echo strlen('lala'), "\n";
// global strlen
echo \strlen('lala'), "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment