卸载php扩展名:反向dl() [英] unloading php extensions : reverse dl()

查看:93
本文介绍了卸载php扩展名:反向dl()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于那里的专家来说,PHP中是否有任何隐藏的gem可以在运行时卸载特定的扩展?

To you gurus out there, is there any hidden gem in PHP that could unload a specific extension at runtime ?

推荐答案

不,这是 不可能 ,很可能永远不会:

No, that's not possible and most likely never will:

[2011-02-08 11:34 UTC] rasmus@php.net
从每个请求的基础上扩展扩展名根本不可行 性能的观点.而且您显然无法卸载并将其卸载 对于下一个请求,因为该下一个请求可能针对的是预期 扩展到那里.

[2011-02-08 11:34 UTC] rasmus@php.net
extension unloading on a per-request basis simply isn't feasible from a performance point of view. And you obviously can't unload and leave it unloaded for the next request because that next request may be for a page that expects the extension to be there.

但是,仍然不建议使用dl()-在最新版本中,仅在CLI版本中可用.

However, using dl() is discouraged anyway - and in recent versions it is only available in the CLI version.

这篇关于卸载php扩展名:反向dl()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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