Download src/php/php-src/Zend/tests/closures/bug70685.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/bug70685.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/closures/bug70685.phpt
-
curl -L -o bug70685.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/closures/bug70685.phpt
565 Bytes
| --TEST-- | |
| Bug #70685: Segfault for getClosure() internal method rebind with invalid $this | |
| --FILE-- | |
| class cls {} | |
| $c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack); | |
| $c = $c->bindTo(new cls); | |
| var_dump($c); | |
| $c = (new ReflectionMethod('SplStack', 'count'))->getClosure(new SplStack); | |
| $c = $c->bindTo(new SplStack, 'cls'); | |
| var_dump($c); | |
| --EXPECTF-- | |
| Warning: Cannot bind method SplDoublyLinkedList::count() to object of class cls in %s on line %d | |
| NULL | |
| Warning: Cannot rebind scope of closure created from method in %s on line %d | |
| NULL | |