mirror of
https://github.com/php/php-src.git
synced 2024-12-17 13:59:28 +08:00
a6a20c9e17
Reproduces only under ASAN. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
30 lines
491 B
PHP
30 lines
491 B
PHP
--TEST--
|
|
GH-10346 (Observer: enum tryFrom() run_time_cache properly assigned)
|
|
--CREDITS--
|
|
Florian Sowade
|
|
--EXTENSIONS--
|
|
zend_test
|
|
--INI--
|
|
zend_test.observer.enabled=1
|
|
zend_test.observer.observe_all=1
|
|
--FILE--
|
|
<?php
|
|
enum Card : string
|
|
{
|
|
case HEART = 'H';
|
|
}
|
|
|
|
var_dump(Card::tryFrom('H'));
|
|
?>
|
|
--EXPECTF--
|
|
<!-- init '%s' -->
|
|
<file '%s'>
|
|
<!-- init Card::tryFrom() -->
|
|
<Card::tryFrom>
|
|
</Card::tryFrom>
|
|
<!-- init var_dump() -->
|
|
<var_dump>
|
|
enum(Card::HEART)
|
|
</var_dump>
|
|
</file '%s'>
|