uopz_delete

(PECL uopz >= 1.0.0)
Delete a function
void uopz_delete ( string $class, string $function )
void uopz_delete ( string $function )

Deletes a function or method

Parameters:
class
void uopz_delete ( string $function )

Deletes a function or method

function
void uopz_delete ( string $function )

Deletes a function or method

Returns:
Examples:
uopz_delete() example
<?php
uopz_delete("strlen");

echo strlen("Hello World");
?>

The above example will output something similar to:

PHP Fatal error: Call to undefined function strlen() in /path/to/script.php on line 4
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");
?>

The above example will output something similar to:

PHP Fatal error: Call to undefined method My::strlen() in /path/to/script.php on line 10
doc_php
2016-02-24 15:54:09
Comments
Leave a Comment

Please login to continue.