<feed xmlns='http://www.w3.org/2005/Atom'>
<title>snuffleupagus/src/tests/disable_function, branch optim85</title>
<subtitle>Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest! 
</subtitle>
<id>http://git.dustri.org/snuffleupagus/atom?h=optim85</id>
<link rel='self' href='http://git.dustri.org/snuffleupagus/atom?h=optim85'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/'/>
<updated>2026-05-09T23:01:43Z</updated>
<entry>
<title>Prevent opcache from inlining functions with return-value rules on PHP 8.5+</title>
<updated>2026-05-09T23:01:43Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-09T23:01:43Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=5f754c32df4bd8643d62babf6f805defe59c8c92'/>
<id>urn:sha1:5f754c32df4bd8643d62babf6f805defe59c8c92</id>
<content type='text'>
PHP 8.5's opcache optimizer can inline trivial user functions (constant
return values), completely eliminating the DO_UCALL opcode. When this
happens, zend_execute_ex is never invoked and snuffleupagus's
return-value monitoring hooks never fire.

Fix this by setting ZEND_ACC_HAS_TYPE_HINTS on monitored functions'
op_arrays during compilation (via sp_op_array_handler). This flag is
checked by opcache's zend_try_inline_call() and prevents inlining.
For 0-arg functions — the only ones eligible for inlining — there are
no RECV opcodes, so the runtime impact is zero.

To enable sp_op_array_handler when return-value rules are configured,
the extension now registers itself as a zend extension and sets
ZEND_COMPILE_HANDLE_OP_ARRAY (previously only done for global_strict).

The disabled_function_echo_2 test is updated to use separate echo
statements and opcache.optimization_level=0, since opcache's echo
merging is a compile-time string concatenation that cannot be prevented
per-function.

This is a bit ugly, but it's the less awful solution to be able to hook return
values.
</content>
</entry>
<entry>
<title>Skip a test on ≥PHP8.5</title>
<updated>2026-05-09T22:09:44Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2026-05-09T22:09:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=0cc8e708ebbff02abe7e3c2d0dc0660585ccd98c'/>
<id>urn:sha1:0cc8e708ebbff02abe7e3c2d0dc0660585ccd98c</id>
<content type='text'>
PHP is now optimizing `echo A,B,C` into `echo A B C`, so the test is pointless.
</content>
</entry>
<entry>
<title>Generalize disabled_functions_regexp_multiple.phpt expected output</title>
<updated>2026-02-22T21:30:14Z</updated>
<author>
<name>Christian Göttsche</name>
</author>
<published>2026-02-22T21:11:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=4985b0f75a3593d1e7777ba6c1b59da4bcf2ea41'/>
<id>urn:sha1:4985b0f75a3593d1e7777ba6c1b59da4bcf2ea41</id>
<content type='text'>
On uncommon architectures, like s390x, `-2` instead of `-1` might be printed.
</content>
</entry>
<entry>
<title>tests: add several skip reasons</title>
<updated>2026-02-15T19:49:09Z</updated>
<author>
<name>Christian Göttsche</name>
</author>
<published>2026-02-15T19:00:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=9e94280c0b6356be37b8f9a0a4d2303146863a5b'/>
<id>urn:sha1:9e94280c0b6356be37b8f9a0a4d2303146863a5b</id>
<content type='text'>
Co-authored-by: Julien "jvoisin" Voisin &lt;julien.voisin@dustri.org&gt;
</content>
</entry>
<entry>
<title>Add support for PHP8.5</title>
<updated>2025-09-01T11:49:08Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-08-31T14:05:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=ee5e383c6bbca94d5f93134510468b3fe87a470c'/>
<id>urn:sha1:ee5e383c6bbca94d5f93134510468b3fe87a470c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Url encode functions arguments when logging them</title>
<updated>2023-02-02T12:17:22Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-02-01T20:12:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=2dcf2a2d7578d1e43ee7e3fa69386ccc5afebbf0'/>
<id>urn:sha1:2dcf2a2d7578d1e43ee7e3fa69386ccc5afebbf0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix the CI for PHP8.2</title>
<updated>2023-01-04T18:10:38Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-01-04T18:06:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=1bf0f3ec9088d34383c564d6306901ae6dc94cb5'/>
<id>urn:sha1:1bf0f3ec9088d34383c564d6306901ae6dc94cb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for PHP8.2</title>
<updated>2022-12-11T17:36:26Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2022-12-10T11:00:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=eb570f29daa42fd8b90ecfff75382846e51b3a15'/>
<id>urn:sha1:eb570f29daa42fd8b90ecfff75382846e51b3a15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Log `eval` content when matching on its parameter</title>
<updated>2022-07-12T19:15:07Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2022-07-12T18:57:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=423e133c569b7d749cba3e1b97e9e138e5f0f892'/>
<id>urn:sha1:423e133c569b7d749cba3e1b97e9e138e5f0f892</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't run disabled_functions_param_str_representation_php8 on php7</title>
<updated>2022-05-16T17:36:01Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2022-05-16T17:34:37Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/snuffleupagus/commit/?id=bee9da3cb2b47d7121ac3fe9cc945716aaaa5d21'/>
<id>urn:sha1:bee9da3cb2b47d7121ac3fe9cc945716aaaa5d21</id>
<content type='text'>
</content>
</entry>
</feed>
