Home
last modified time | relevance | path

Searched refs:tryFrom (Results 1 – 14 of 14) sorted by relevance

/PHP-8.2/Zend/tests/enum/
H A Dbacked-tryFrom.phpt2 BackedEnum::tryFrom()
13 var_dump(Suit::tryFrom('H'));
14 var_dump(Suit::tryFrom('D'));
15 var_dump(Suit::tryFrom('C'));
16 var_dump(Suit::tryFrom('S'));
17 var_dump(Suit::tryFrom('X'));
25 var_dump(Foo::tryFrom(1));
26 var_dump(Foo::tryFrom(2));
27 var_dump(Foo::tryFrom(3));
28 var_dump(Foo::tryFrom(4));
H A Dbacked-tryFrom-casing.phpt2 BackedEnum::tryFrom() casing in reflection
9 $reflectionMethod = $reflectionEnum->getMethod('tryFrom');
15 tryFrom
H A Dinternal_enums_strict_types.phpt2 Internal enums from/tryFrom in strict_types=1
19 var_dump(ZendTestStringEnum::tryFrom(43));
28 ZendTestStringEnum::tryFrom(): Argument #1 ($value) must be of type string, int given
H A Dempty-from.phpt2 Empty enum with from/tryFrom doens't segfault
8 var_dump(A::tryFrom('B'));
H A Dinternal_enums.phpt23 var_dump(ZendTestStringEnum::tryFrom("Test3"));
24 var_dump(ZendTestStringEnum::tryFrom(42));
25 var_dump(ZendTestStringEnum::tryFrom(43));
26 var_dump(ZendTestStringEnum::tryFrom(0));
39 var_dump(ZendTestIntEnum::tryFrom($case));
H A Dbacked-tryFrom-unknown-hash.phpt2 BackedEnum::tryFrom() unknown hash
13 var_dump(Foo::tryFrom($s));
H A Dbacked-duplicate-int.phpt30 var_dump(Foo::tryFrom('bar'));
40 Foo::tryFrom(): Argument #1 ($value) must be of type int, string given
H A Dbacked-duplicate-string.phpt32 var_dump(Suit::tryFrom('bar'));
/PHP-8.2/Zend/tests/
H A Dgh10346.phpt2 GH-10346 (Observer: enum tryFrom() run_time_cache properly assigned)
18 var_dump(Card::tryFrom('H'));
23 <!-- init Card::tryFrom() -->
24 <Card::tryFrom>
25 </Card::tryFrom>
/PHP-8.2/ext/zend_test/tests/
H A Dinternal-call-internal-static-return.phpt17 var_dump(zend_call_method(IntIntStaticInt::class, "tryFrom", 42));
19 var_dump(zend_call_method(IntIntStaticString::class, "tryFrom", "all the fish"));
/PHP-8.2/Zend/
H A Dzend_enum.stub.php14 public static function tryFrom(int|string $value): ?static; function
H A Dzend_enum_arginfo.h26 …ZEND_ABSTRACT_ME_WITH_FLAGS(BackedEnum, tryFrom, arginfo_class_BackedEnum_tryFrom, ZEND_ACC_PUBLIC…
H A Dzend_enum.c482 …ZEND_NAMED_ME(tryFrom, zend_enum_try_from_func, arginfo_class_BackedEnum_tryFrom, ZEND_ACC_PUBLIC …
/PHP-8.2/
H A DUPGRADING.INTERNALS61 similiar to BackedEnum::from() and BackedEnum::tryFrom().

Completed in 29 milliseconds