APD 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程

override_function

(PECL apd >= 0.2)

override_functionOverrides built-in functions

说明

bool override_function ( string $function_name , string $function_args , string $function_code )

Overrides built-in functions by replacing them in the symbol table.

参数

function_name

The function to override.

function_args

The function arguments, as a coma separated string.

Usually you will want to pass this parameter, as well as the function_code parameter, as a single quote delimited string. The reason for using single quoted strings, is to protect the variable names from parsing, otherwise, if you use double quotes there will be a need to escape the variable names, e.g. \$your_var.

function_code

The new code for the function.

返回值

如果成功则返回 TRUE,失败则返回 FALSE

范例

Example #1 override_function() example

<?php
override_function
('test''$a,$b''echo "DOING TEST"; return $a * $b;');
?>


APD 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程