summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-15 14:59:07 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-15 14:59:07 +0100
commite70f1b04888cff3a1cba61e0bc78903ccb419c30 (patch)
tree61d4385f6a524d8e16ae3bd04b4e77a9d9de1209 /Zend/tests
parent643a727c37de0e87cf7b0fa9f422f527a308dd13 (diff)
parent882862563a8281457afb9c5ad93763605e295270 (diff)
downloadphp-git-e70f1b04888cff3a1cba61e0bc78903ccb419c30.tar.gz
Merge branch 'PHP-8.0'
* PHP-8.0: Fix symtable cache being used while cleaning symtable
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/symtable_cache_recursive_dtor.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/symtable_cache_recursive_dtor.phpt b/Zend/tests/symtable_cache_recursive_dtor.phpt
new file mode 100644
index 0000000000..def0816a66
--- /dev/null
+++ b/Zend/tests/symtable_cache_recursive_dtor.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Symtable cache slots may be acquired while cleaning symtable
+--FILE--
+<?php
+class A {
+ // Must be larger than the symtable cache.
+ static $max = 40;
+ function __destruct() {
+ if (self::$max-- < 0) return;
+ $x = 'y';
+ $$x = new a;
+ }
+}
+new A;
+
+?>
+===DONE===
+--EXPECT--
+===DONE===