PHP的runkit_function_rename不起作用? [英] PHP runkit_function_rename don't work?

查看:362
本文介绍了PHP的runkit_function_rename不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这段代码不起作用。为什么不呢?

 <?php 
function test()
{
echo'测试';
}
runkit_function_rename('test','test2');
test2();
?>

我真正想要的是这个。我正在使用一个有功能的系统。当我在本地主机上时,我希望该功能可以做一些不同的事情。我想用自己的东西来覆盖函数。



所有替代方法都是可以接受的。

解决方案

您是否安装了PECL扩展程序? $ b

http://www.php.net/manual/en/runkit.installation.php

 这»PECL扩展没有与PHP捆绑在一起。 


This code don't work. Why not?

<?php
function test()
{
    echo 'test';
}
runkit_function_rename('test', 'test2');
test2();
?>

What I really want is this. I'm using a system that have a function. When I'm on localhost I want that function to do something different. I want to override the function with own stuff.

All alternatives are welcome as well.

解决方案

Do you have the PECL extension installed?

http://www.php.net/manual/en/runkit.installation.php

This » PECL extension is not bundled with PHP.

这篇关于PHP的runkit_function_rename不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆