Searched refs:tryFrom (Results 1 – 12 of 12) sorted by relevance
2 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));
2 BackedEnum::tryFrom() casing in reflection9 $reflectionMethod = $reflectionEnum->getMethod('tryFrom');15 tryFrom
2 Internal enums from/tryFrom in strict_types=119 var_dump(ZendTestStringEnum::tryFrom(43));28 ZendTestStringEnum::tryFrom(): Argument #1 ($value) must be of type string, int given
2 Empty enum with from/tryFrom doesn't segfault8 var_dump(A::tryFrom('B'));
23 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));
2 BackedEnum::tryFrom() unknown hash13 var_dump(Foo::tryFrom($s));
30 var_dump(Foo::tryFrom('bar'));40 Foo::tryFrom(): Argument #1 ($value) must be of type int, string given
32 var_dump(Suit::tryFrom('bar'));
2 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>
17 var_dump(zend_call_method(IntIntStaticInt::class, "tryFrom", 42));19 var_dump(zend_call_method(IntIntStaticString::class, "tryFrom", "all the fish"));
14 public static function tryFrom(int|string $value): ?static; function
496 …ZEND_NAMED_ME(tryFrom, zend_enum_try_from_func, arginfo_class_BackedEnum_tryFrom, ZEND_ACC_PUBLIC …
Completed in 15 milliseconds