Download src/php/php-src/Zend/tests/gc/bug65372.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 725 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/gc/bug65372.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/gc/bug65372.phpt
-
curl -L -o bug65372.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/gc/bug65372.phpt
725 Bytes
| --TEST-- | |
| Bug #65372 (Segfault in gc_zval_possible_root when return reference fails) | |
| --FILE-- | |
| class ParentClass | |
| { | |
| private static $_OBJECTS; | |
| public static function Get() | |
| { | |
| self::$_OBJECTS[1] = new ChildClass(); | |
| return self::$_OBJECTS[1]; | |
| } | |
| } | |
| class ChildClass extends ParentClass | |
| { | |
| public $Manager; | |
| function __construct() | |
| { | |
| $this->Manager = $this; | |
| } | |
| public static function &GetCurrent() | |
| { | |
| return ChildClass::Get(); | |
| } | |
| public static function &Get() | |
| { | |
| return parent::Get(); | |
| } | |
| } | |
| $staff = ChildClass::GetCurrent(); | |
| --EXPECTF-- | |
| Notice: Only variable references should be returned by reference in %sbug65372.php on line 30 | |