Home
last modified time | relevance | path

Searched refs:trait (Results 1 – 25 of 239) sorted by relevance

12345678910

/PHP-7.4/ext/standard/tests/class_object/
H A Dtrait_exists_basic_001.phpt6 * Description: Checks if the trait exists
17 trait MyTrait {}
21 echo "\nCalling trait_exists() on existing trait with autoload explicitly enabled:\n";
29 echo "\nCalling trait_exists() on non-existent trait with autoload unspecified:\n";
31 echo "\nCalling trait_exists() on existing trait with autoload unspecified:\n";
38 Calling trait_exists() on non-existent trait with autoload explicitly enabled:
42 Calling trait_exists() on existing trait with autoload explicitly enabled:
45 Calling trait_exists() on non-existent trait with autoload explicitly enabled:
48 Calling trait_exists() on existing trait with autoload explicitly disabled:
51 Calling trait_exists() on non-existent trait with autoload unspecified:
[all …]
H A Dget_declared_traits_basic_001.phpt14 trait MyTrait {}
20 foreach (get_declared_traits() as $trait) {
21 if (!trait_exists($trait)) {
22 echo "Error: $trait is not a valid trait.\n";
26 echo "\n-- Ensure trait is listed --\n";
48 -- Ensure trait is listed --
/PHP-7.4/Zend/tests/
H A Dname_collision_06.phpt2 Object naming collision error: trait/trait
6 trait A { }
7 trait A { }
11 Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d
H A Dname_collision_03.phpt2 Object naming collision error: class/trait
7 trait A { }
11 Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d
H A Dname_collision_05.phpt2 Object naming collision error: interface/trait
7 trait A { }
11 Fatal error: Cannot declare trait A, because the name is already in use in %s on line %d
H A Dbug63219.phpt2 Bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion)
5 trait TFoo {
18 Fatal error: Could not find trait Typo in %sbug63219.php on line %d
/PHP-7.4/Zend/tests/traits/
H A Derror_011.phpt2 Testing trait collisions
6 trait foo {
9 trait c {
13 trait b {
26 Fatal error: Trait method test has not been applied, because there are collisions with other trait
H A Derror_010.phpt2 Trying to exclude trait method multiple times
6 trait foo {
9 trait c {
23 Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be ex…
H A Dbug63911.phpt2 Bug #63911 (Ignore conflicting trait methods originationg from identical sub traits)
5 trait A
11 trait B
15 trait C
H A Dlanguage009.phpt2 In instead definitions all trait whose methods are meant to be hidden can be listed.
7 trait A {
13 trait B {
19 trait C {
H A Derror_009.phpt2 Trying to extend a trait
6 trait abc { }
12 Fatal error: Class foo cannot extend from trait abc in %s on line %d
H A Derror_007.phpt2 Trying to instantiate a trait
6 trait abc {
13 Fatal error: Uncaught Error: Cannot instantiate trait abc in %s:%d
H A Derror_015.phpt2 Trying to add an alias to a trait method where there is another with same name.
7 trait foo {
11 trait baz {
26 Fatal error: Trait method test has not been applied, because there are collisions with other trait
H A Dflattening003.phpt7 trait Hello {
13 trait World {
19 trait HelloWorld {
H A Dbug60173.phpt2 Bug #60173 (Wrong error message on reflective trait instantiation)
6 trait foo { }
11 Fatal error: Uncaught Error: Cannot instantiate trait foo in %s:%d
H A Dbug76700.phpt2 Bug #76700 (false-positive "Error: Call to protected method" when using trait aliases)
5 trait T1
10 trait T2
H A Dlanguage015.phpt2 Invalid conflict resolution (unused trait as lhs of "insteadof")
5 trait T1 {
8 trait T2 {
H A Dlanguage016.phpt2 Invalid conflict resolution (unused trait as rhs of "insteadof")
5 trait T1 {
8 trait T2 {
H A Dlanguage017.phpt2 Invalid conflict resolution (unused trait as lhs of "as")
5 trait T1 {
8 trait T2 {
H A Derror_001.phpt6 trait foo {
12 trait foo2 {
28 Fatal error: Class A cannot extend from trait foo in %s on line %d
H A Dtrait_constant_001.phpt2 __TRAIT__: Basics, a constant denoiting the trait of definition.
6 trait TestTrait {
20 trait TestTraitIndirect {
H A Dconflict001.phpt7 trait THello1 {
13 trait THello2 {
25 Fatal error: Trait method hello has not been applied, because there are collisions with other trait
H A Dbug54441.phpt2 Bug #54441 (Changing trait static method visibility)
6 trait Foo {
19 Fatal error: The modifiers for the trait alias dontKnow() need to be changed in the same statement …
H A Dbug60165c.phpt2 Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
6 trait A {
10 trait B {
H A Dmethods_002.phpt6 trait foo {
12 trait baz {
28 …hod __clone has not been applied, because there are collisions with other trait methods on bar in …

Completed in 33 milliseconds

12345678910