- function_exists: documentation ( source)
- strlen: documentation ( source)
<?php
namespace Foo;
foreach ( array(1,2,3) as $i ) {
echo strlen('hello'), ' ';
shadow_strlen();
echo strlen('hello'), '; ';
}
function shadow_strlen() {
if ( ! function_exists('Foo\\strlen') ) {
function strlen($s) {
return 42;
}
}
}