diff options
Diffstat (limited to 'ext/opcache/tests/preload_bug78175_2.inc')
-rw-r--r-- | ext/opcache/tests/preload_bug78175_2.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/opcache/tests/preload_bug78175_2.inc b/ext/opcache/tests/preload_bug78175_2.inc new file mode 100644 index 0000000000..288c142678 --- /dev/null +++ b/ext/opcache/tests/preload_bug78175_2.inc @@ -0,0 +1,20 @@ +<?php +class Loader { + static private $loader; + + static function getLoader() { + if (null !== self::$loader) { + return self::$loader; + } + return self::$loader = new Loader(); + } + + static function getCounter() { + static $counter = 0; + return $counter++; + } +} + +Loader::getLoader(); +Loader::getCounter(); +Loader::getCounter(); |