©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
(PECL uopz >= 1.0.0)
uopz_delete — Delete a function
$class
, string $function
)$function
)Deletes a function or method
class
function
Example #1 uopz_delete() example
<?php
uopz_delete ( "strlen" );
echo strlen ( "Hello World" );
?>
以上例程的输出类似于:
PHP Fatal error: Call to undefined function strlen() in /path/to/script.php on line 4
Example #2 uopz_delete() class example
<?php
class My {
public static function strlen ( $arg ) {
return strlen ( $arg );
}
}
uopz_delete ( My ::class, "strlen" );
echo My :: strlen ( "Hello World" );
?>
以上例程的输出类似于:
PHP Fatal error: Call to undefined method My::strlen() in /path/to/script.php on line 10