Re: make FILE_ constants not collide with LOCK_
| From: | Hans Henrik Bergan | Date: | Wed, 14 Jun 2023 09:39:15 +0000 |
| Subject: | Re: make FILE_ constants not collide with LOCK_ | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120572@lists.php.net to get a copy of this message | ||
thanks for the thumbs up and morrisonlevi's review, it's appreciated.
still needs a maintainer/core-dev approval though.
btw the old file() flags check was actually flawed and would miss some
incorrect flags, for example
flags = 10 aka `flags= (1 << 1) | (1
<< 3)` is, and always was, incorrect for file() because file() does
not support PHP_FILE_APPEND, but the old flags error-check code would
miss it (and miss the error in file("file", FILE_APPEND) ). the new
check doesn't. As an added bonus, seems the new flags check is about
7% faster too: https://quick-bench.com/q/j3k_unXcE91gVdTRH9Dm0nxpDUA
(guess it's because it avoids the flags < 0 thing)
On Tue, 6 Jun 2023 at 12:54, Hans Henrik Bergan <divinity76@gmail.com> wrote:
>
> Can I get some attention to
> https://github.com/php/php-src/pull/11254
> ? It's been 3 weeks and nothing so far