简体   繁体   English

PHP,是否有可能,如果它是一个简单的过程,如何覆盖美元符号,$?

[英]PHP, is it possible and if it is a simple process, how to overwrite the dollar sign, $?

I was wondering if it's possible to overwrite the dollar sign in php (the one that prefixes variable names, like $var ).我想知道是否可以覆盖 php 中的美元符号(以变量名为前缀的符号,如$var )。 I am wondering if I can overwrite it to something like the pound sign (£), a Chinese symbol, or perhaps the number sign (#), for £var ,木var , or #var .我想知道是否可以将其覆盖为英镑符号 (£)、中文符号或数字符号 (#) 之类的东西,用于£var木var#var

You certainly could.你当然可以。 You would need to download the PHP source, and modify the parser to support this instead.您需要下载 PHP 源代码,并修改解析器以支持它。 Not trivial, but a possibility due to the fact that PHP is open source.这不是微不足道的,而是一种可能性,因为 PHP 是开源的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM