xref: /PHP-8.2/Zend/tests/gh10346.phpt (revision e7462bff)
1--TEST--
2GH-10346 (Observer: enum tryFrom() run_time_cache properly assigned)
3--CREDITS--
4Florian Sowade
5--EXTENSIONS--
6zend_test
7--INI--
8zend_test.observer.enabled=1
9zend_test.observer.show_output=1
10zend_test.observer.observe_all=1
11--FILE--
12<?php
13enum Card : string
14{
15    case HEART = 'H';
16}
17
18var_dump(Card::tryFrom('H'));
19?>
20--EXPECTF--
21<!-- init '%s' -->
22<file '%s'>
23  <!-- init Card::tryFrom() -->
24  <Card::tryFrom>
25  </Card::tryFrom>
26  <!-- init var_dump() -->
27  <var_dump>
28enum(Card::HEART)
29  </var_dump>
30</file '%s'>
31