php-src
php-src copied to clipboard
The PHP Interpreter
### Description The following code: ```php
### Description ### Proposal ```php // Nullsafe call $res = $optionalClosure?->(1, 2, 3); $res = ($obj->optionalClosure)?->(1, 2, 3); // or even? $res = $obj->optionalClosure?->(1, 2, 3); // Nullsafe index access...
From manual page: https://php.net/function.hash-hmac-file --- `string $data,` should be `string $filename,` to have the same naming scheme as [hash-file()](https://www.php.net/manual/en/function.hash-file.php).
### Description Currently `match()` not allow use lambda functions. If you try ` $test = 'test'; $a = match($test) { 'test' => function($test) { print_r($test); } }; ` - Return...
### Description PHP `8.1` introduced support in the FPM SAPI for the OpenMetrics format when requesting the status of FPM. While trying to scrape the metrics using Prometheus, I get...
### Description Currently we have ``` $a = ['01' => '01', '10' => '10']; var_dump($a); // (string) 01 => (string) 01 // (int) 10 => (string) 10 var_dump(array_flip($a)); // (string)...
### Description stripos is slow because both input strings are always lowercased completely. This also entails unnecessary memory consumption. preg_match with case-insensitive flag is a much faster alternative. Source code:...
### Description The following code in a relatively minimal docker compose setup of PHP + nginx for reproduction: src/index.php: ```php Upload your files Upload your file ``` docker-compose.yml ```yml services:...
### Description Debian: ``` $ php-config --libs -lcrypt -largon2 -lresolv -lcrypt -lrt -lm -ldl -lxml2 -lssl -lcrypto -lpcre2-8 -lz -lsodium -lcrypt -largon2 -lcrypt $ php-config8.1 --libs -lcrypt -lresolv -lcrypt -lutil...
### Description When running the following code with the built-in webserver, I experience a segfault: https://3v4l.org/KrlXs With one additional match arm (anything seems fine), it no longer occurs. I do...