略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: uopz_delete

2024-11-14

uopz_delete

(PECL uopz 1, PECL uopz 2)

uopz_deleteDelete a function

警告

This function has been REMOVED in PECL uopz 5.0.0.

说明

uopz_delete(string $function): void
uopz_delete(string $class, string $function): void

Deletes a function or method

参数

class

function

返回值

范例

示例 #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

示例 #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
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.uopz-delete.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3