diff options
author | Arpad Ray <arraypad@gmail.com> | 2013-07-19 19:19:48 +0100 |
---|---|---|
committer | Arpad Ray <arraypad@gmail.com> | 2013-07-19 19:19:48 +0100 |
commit | a015fa83a735da7342dd7ae172c4516265bed41d (patch) | |
tree | 4f9ba30e1ccc0bab72ce8d11202f95c4da652eb7 /Zend/tests | |
parent | 2b9d42433f8e634593c2306d5d0ef61cc44281bf (diff) | |
download | php-git-a015fa83a735da7342dd7ae172c4516265bed41d.tar.gz |
Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/bug65291.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/bug65291.phpt b/Zend/tests/bug65291.phpt new file mode 100644 index 0000000000..9e5cca5c35 --- /dev/null +++ b/Zend/tests/bug65291.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #65291 - get_defined_constants() causes PHP to crash in a very limited case. +--FILE-- +<?php + +trait TestTrait +{ + public static function testStaticFunction() + { + return __CLASS__; + } +} +class Tester +{ + use TestTrait; +} + +$foo = Tester::testStaticFunction(); +get_defined_constants(); + +echo $foo; +?> +--EXPECT-- +Tester |