Terminology question on “dereferencing”?

笑着哭i 提交于 2019-11-29 16:20:08

That's called Array dereferencing, and will become available in PHP 5.4 (which is currently in alpha)

Note (thanks Gordon) : what you are asking for, with array()1, is not possible even in PHP 5.4 -- but it'll work for functions.


A couple of sources :


Quoting that last news :

Here is an incomplete list of changes:
- Added: Traits language construct
- Added: Array dereferencing support
- Added: DTrace support
- Improved: Improved Zend Engine memory usage and performance
- Moved: ext/sqlite moved to pecl (sqlite3 support is still built-in)


1.array() is not a function, even if it looks like one -- it's actually what PHP calls a language construct ; and those don't behave like functions.

Michael Berkowski

This is called "array dereferencing" and it will be available for use in PHP5.4.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!