问题描述
PHP中的 fexpr 是什么?正如我到目前为止所捕获的,它是Lisp语言中的一种有用函数:
我正在阅读深入讨论PHP构造的文章,我面对 fexpr 这就是为什么我不能清楚地包裹我的头。你介意在PHP中 fexpr 是什么?和(如果其语义上可以想象)请提供一个例子&使用大小写。 简单地说 - 这就是使像 如果这不能回答您的问题,那么您首先需要了解编译器和运行时是什么。 ..恐怕这太宽泛了,不能在这里解释。
isset()
和 empty()
来接受可能未定义的变量。 这是唯一可能的,因为它们不是实际上是函数,但是语言关键字(尝试声明带有这些名称的类,它不起作用)由解析器识别,然后由编译器执行。
常规函数在运行时执行。
除此之外,我不知道Lisp,但我只能假设fexpr是一个该语言的突出特点。如你所说,你可能会声明你自己的fexpr-essions - PHP没有这个;它只是将这个概念用于一些特殊情况。
What is fexpr in PHP? As I caught so far, It is a kinda function in Lisp language:
I was reading an article which had deeply discussed PHP constructs, I faced fexpr there & Googling led me into the fact that it is fundamentally a Lisp concept!
That's why I can't clearly wrap my head around. Would you mind explain what fexpr is in PHP? and (if its semantically conceivable) Please provide an example & Use Case.
Simply put - it's the thing that enables "functions" like isset()
and empty()
to accept possibly undefined variables.
That's only possible because they aren't actually functions, but language keywords (try declaring classes with those names, it won't work) recognized by the parser and then executed by the compiler.A regular function is executed at runtime.
If that doesn't answer your question, then you'd first need to understand what compilers and runtimes are ... I'm afraid that's too broad to explain here.
Other than that, I don't know Lisp, but I can only assume that "fexpr" is a prominent feature in that language. As in, you could possibly declare your own fexpr-essions - PHP doesn't have this; it just utilizes the concept for a few special cases.
这篇关于什么是PHP中的fexpr?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!