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 1addf64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/miscellaneous/stubs.rst
Original file line number Diff line number Diff line change
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 1addf64

Please sign in to comment.