xref: /PHP-7.2/Zend/tests/traits/bug69579.phpt (revision 16ae9f82)
1--TEST--
2Bug #69579 (Internal trait double-free)
3--SKIPIF--
4<?php
5if (!trait_exists('_ZendTestTrait')) die("skip requires internal trait");
6?>
7--FILE--
8<?php
9
10class Bar{
11  use _ZendTestTrait;
12}
13
14$bar = new Bar();
15var_dump($bar->testMethod());
16// destruction causes a double-free and explodes
17
18?>
19--EXPECT--
20bool(true)
21