Skip to content

Commit

Permalink
Fix some review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Mar 17, 2024
1 parent cbb3412 commit a5e5648
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/source/miscellaneous/stubs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The above example declares the global constants and class ``Foo`` in the top-lev
********************

By convention, stub files have a ``.stub.php`` extension. They are processed by
``build/gen_stub.php``: it uses PHP-Parser_ for parsing, then depending on the configuration and the
``build/gen_stub.php``: it uses `PHP-Parser`_ for parsing, then depending on the configuration and the
supplied arguments, it can generate various artifacts. The following sections will introduce these
capabilities.

Expand Down Expand Up @@ -472,16 +472,16 @@ Please note that the feature is only available for built-in stubs inside php-src
there is no way to provide the function list for the optimizer other than overwriting
``zend_func_infos.h`` directly.

Additionally, functions can be evaluated in compile-time if their arguments are known in
Additionally, functions can be evaluated at compile-time if their arguments are known in
compile-time and their behavior if free from side-effects as well as it is not affected by the
global state. Until PHP 8.2, a list of such functions was maintained manually in the optimizer.
However, since PHP 8.2, the ``@compile-time-eval`` PHPDoc tag can be applied to any functions which
conform to the above restrictions in order for them to qualify as evaluable in compile-time. The
conform to the above restrictions in order for them to qualify as evaluable at compile-time. The
feature internally works by adding the ``ZEND_ACC_COMPILE_TIME_EVAL`` function flag.

As of PHP 8.4, the concept of arity-based frameless functions was introduced. This is another
optimization technique, which results in faster internal function calls by eliminating unnecessary
checks for the number of passed parameters (if the number of passed arguments is known in
checks for the number of passed parameters (if the number of passed arguments is known at
compile-time).

In order to take advantage of frameless functions, the ``@frameless-function`` PHPDoc tag has to be
Expand Down

0 comments on commit a5e5648

Please sign in to comment.