php-src
php-src copied to clipboard
The PHP Interpreter
### Description Surely this is not a mistake, but I do not understand why it is so. Consider the following code: ```php if (0) echo "int 0 is true" ....
### Description The following code: ```php var_dump( (new \DateTime('2203-10-05 15:05:37.180157', new \DateTimeZone('America/Los_Angeles'))) ->getTimestamp() ); ``` https://3v4l.org/HpVAr produces different result on PHP 8.1 vs PHP 7.4/8.0 it is from our failing...
### Description The following code: ```php
### Description The following code: ```php foreach ([0.4, 0, -0.4, -1, -1.4] as $ts) { $date = new DateTime('@' . $ts); print_r($date); } ``` https://3v4l.org/EWpSj Diff of current output vs...
### Description I believe the stub file entries for [`hash()`](https://github.com/php/php-src/blob/701e5fe4aecfa4ba75d71c4ebe37e0e0cc8ed131/ext/hash/hash.stub.php#L6) and [`hash_hmac()`](https://github.com/php/php-src/blob/701e5fe4aecfa4ba75d71c4ebe37e0e0cc8ed131/ext/hash/hash.stub.php#L12) to be incorrect. Their return types are both specified as `string|false`, but starting with PHP 8.0 they in...
### Description When `httpd` is terminating, function `oci8`.`php_oci_cleanup_global_handles` is sometimes called twice. It symbol `ZTS` is defined, the second call fails, as the thread specific data-area has already been freed...
### Description The following code: ```php
### Description https://3v4l.org/UtjRl This code should blame line 4, not line 7, since that's where the bogus constant is actually declared. _____________________________ An example of where this is more problematic:...
### Description Currently [spl_iterators.h](https://github.com/php/php-src/blob/f583c4dfd222142b043949c6a3399f87cd8a2d47/ext/spl/spl_iterators.h#L22) includes php_pcre.h so that it can be [reference in the spl_dual_it_object struct](https://github.com/php/php-src/blob/f583c4dfd222142b043949c6a3399f87cd8a2d47/ext/spl/spl_iterators.h#L139) but only as a pointer to a . This makes a dependency on the...
### Description The following code: ```php