douba1617 2015-12-02 19:24
浏览 24

php7 shimmying类型关键字,以方便过渡

I want to improve my php5 codebase and make it ready for php7. alas, for code that I want to run on a php5 interpreter, I would like to do the C preprocessor equivalent of

 #define int
 #define float
 #define string
 #define bool

and perhaps

 #define array

so that

 function(int $x) {...}

is seen by php5 to be the same as

 function($x) {...}

it would also clarify the meaning of my code to me, even if it does not trigger anything in the interpreter itself.

is this possible?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python按要求编写程序
    • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
    • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
    • ¥15 opencv图像处理,需要四个处理结果图
    • ¥15 无线移动边缘计算系统中的系统模型
    • ¥15 深度学习中的画图问题
    • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条
    • ¥15 Python报错怎么解决
    • ¥15 simulink如何调用DLL文件
    • ¥15 关于用pyqt6的项目开发该怎么把前段后端和业务层分离