(PECL uopz 1, PECL uopz 2)
uopz_delete — Supprime une fonction
Cette fonction a été SUPPRIMEE dand PECL uopz 5.0.0.
Supprime une fonction ou une méthode.
class
function
Exemple #1 Exemple avec uopz_delete()
<?php
uopz_delete("strlen");
echo strlen("Hello World");
?>
Résultat de l'exemple ci-dessus est similaire à :
PHP Fatal error: Call to undefined function strlen() in /path/to/script.php on line 4
Exemple #2 Exemple avec uopz_delete() et une classe
<?php
class My {
public static function strlen($arg) {
return strlen($arg);
}
}
uopz_delete(My::class, "strlen");
echo My::strlen("Hello World");
?>
Résultat de l'exemple ci-dessus est similaire à :
PHP Fatal error: Call to undefined method My::strlen() in /path/to/script.php on line 10
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant