[php-src] Issue #12518: Compiler / interpreter hints

From: Date: Wed, 25 Oct 2023 10:12:06 +0000
Subject: [php-src] Issue #12518: Compiler / interpreter hints
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245647@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12518 Author: deeprobin ### Description Hello all, I need a way to protect my PHP code from code optimizations (inlining for example). In my concrete case it is about an IO benchmark where some things should not be optimized away. I am looking for a way to somehow tell the engine not to inline or to inline a method, e.g. with an internal hint. I could imagine the following: ```php /** * @zend no-inline no-optimization no-opcache */ private function __blackbox(mixed $x) {} ``` ```php /** * @zend force-inline */ private function __highly_optimized(int $a, int $b): int { return a + b; } ```

« previous php.bugs (#245647) next »