php-src/ext/opcache/tests/preload_trait_static.inc
Nikita Popov be89a5c7f1 Fixed bug #78950: Preloading trait method with static variables
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00

12 lines
129 B
PHP

<?php
trait Foo {
public function test() {
static $bar;
var_dump($bar);
}
}
class Bar {
use Foo;
}