Home
last modified time | relevance | path

Searched refs:method (Results 1 – 25 of 885) sorted by relevance

12345678910>>...36

/PHP-8.0/Zend/tests/
H A Dbug55247.phpt16 $method = 'method';
20 $test->method();
21 $test->$method();
24 Test::method();
25 Test::$method();
29 method
30 method
31 method
32 method
33 method
[all …]
H A Dcall_to_abstract_method_args.phpt2 Check that arguments are freed when a call to an abstract method throws
7 abstract static function method();
11 Test::method(new stdClass);
18 $ret = Test::method(new stdClass);
25 Cannot call abstract method Test::method()
26 Cannot call abstract method Test::method()
H A Ddynamic_call_non_static.phpt2 Dynamic static call of non-static method
7 $method = ['Foo', 'bar'];
8 $method();
11 $method = 'Foo::bar';
12 $method();
29 Non-static method Foo::bar() cannot be called statically
30 Non-static method Foo::bar() cannot be called statically
H A Dindirect_call_string_002.phpt2 Indirect call with empty class and/or method name.
7 public static function __callStatic($method, array $args)
9 var_dump($method);
17 // Test call using Class::method syntax.
22 $callback = ['', 'method'];
29 // Test Class::method syntax with empty class name
30 $callback = '::method';
37 // Test array syntax with empty class and method name
45 // Test Class::method syntax with empty class and method name
62 $callback = ':method';
[all …]
H A Dbug68475.phpt2 Bug #68475 Calling function using $callable() syntax with strings of form 'Class::method'
9 echo "Static method called!\n";
14 printf("Static method called with args: %s, %s, %s\n", $arg1, $arg2, $arg3);
18 // Test basic call using Class::method syntax.
35 // Reference undefined method.
52 Static method called!
53 Static method called!
54 Static method called with args: arg1, arg2, arg3
55 Static method called with args: arg1, arg2, arg3
56 Call to undefined method TestClass::undefinedMethod()
H A Dbug19859.phpt7 function __call($method,$args)
9 print "test::__call invoked for method '$method'\n";
18 test::__call invoked for method 'fake'
19 test::__call invoked for method 'fake'
20 test::__call invoked for method 'fake'
H A Dindirect_call_from_constant.phpt8 public static function method()
14 ['Test', 'method']();
16 'Test::method'();
18 (['Test', 'method'])();
20 ('Test::method')();
H A Dindirect_call_string_001.phpt2 Indirect call with 'Class::method' syntax with class in namespace
11 echo "Static method called!\n";
16 printf("Static method called with args: %s, %s, %s\n", $arg1, $arg2, $arg3);
23 // Test basic call using Class::method syntax.
42 Static method called!
43 Static method called!
44 Static method called with args: arg1, arg2, arg3
45 Static method called with args: arg1, arg2, arg3
/PHP-8.0/ext/reflection/tests/
H A DReflectionMethod_getModifiers_basic.phpt10 foreach ($methodArray as $method) {
11 echo "Modifiers for method $method->class::$method->name():\n";
97 Modifiers for method TestClass::foo():
101 Modifiers for method TestClass::stat():
105 Modifiers for method TestClass::priv():
109 Modifiers for method TestClass::prot():
113 Modifiers for method TestClass::fin():
189 Modifiers for method TestClass::foo():
193 Modifiers for method TestClass::stat():
197 Modifiers for method TestClass::prot():
[all …]
H A DReflectionClass_toString_001.phpt31 Method [ <internal:Reflection> final private method __clone ] {
52 Method [ <internal:Reflection> public method getName ] {
58 Method [ <internal:Reflection> public method isInternal ] {
70 Method [ <internal:Reflection> public method isAnonymous ] {
82 Method [ <internal:Reflection> public method isCloneable ] {
88 Method [ <internal:Reflection> public method getFileName ] {
100 Method [ <internal:Reflection> public method getEndLine ] {
118 Method [ <internal:Reflection> public method hasMethod ] {
125 Method [ <internal:Reflection> public method getMethod ] {
231 Method [ <internal:Reflection> public method isTrait ] {
[all …]
H A Dbug80190.phpt25 foreach ((new ReflectionClass(C::class))->getMethods() as $method) {
26 print $method->getDeclaringClass()->getName() . '::' . $method->getName() . '()' . PHP_EOL;
27 print ' $method->getReturnType() returns ' . get_class($method->getReturnType()) . PHP_EOL;
28 … print ' $method->getReturnType()->__toString() returns ' . $method->getReturnType() . PHP_EOL;
31 …print ' $method->getReturnType()->getTypes() returns an array with ' . count($method->getReturn…
50 $method->getReturnType() returns ReflectionNamedType
51 $method->getReturnType()->__toString() returns self
54 $method->getReturnType() returns ReflectionUnionType
60 $method->getReturnType() returns ReflectionNamedType
61 $method->getReturnType()->__toString() returns static
[all …]
H A DReflectionMethod_basic2.phpt2 ReflectionMethod class __toString() method
6 function reflectMethod($class, $method) {
7 $methodInfo = new ReflectionMethod($class, $method);
9 echo "Reflecting on method $class::$method()\n\n";
52 Reflecting on method DerivedClass::foo()
62 Reflecting on method TestClass::stat()
72 Reflecting on method TestClass::priv()
82 Reflecting on method TestClass::prot()
92 Reflecting on method DerivedClass::prot()
102 Reflecting on method TestInterface::int()
[all …]
H A Dclosures_003_v1.phpt8 $method = new ReflectionFunction ($closure);
9 $params = $method->getParameters ();
10 unset ($method);
11 $method = $params[0]->getDeclaringFunction ();
13 echo $method->getName ()."\n";
16 $method = $parameter->getDeclaringFunction ();
18 echo $method->getName ()."\n";
H A Dclosures_003.phpt8 $method = new ReflectionMethod ($closure, '__invoke');
9 $params = $method->getParameters ();
10 unset ($method);
11 $method = $params[0]->getDeclaringFunction ();
13 echo $method->getName ()."\n";
16 $method = $parameter->getDeclaringFunction ();
18 echo $method->getName ()."\n";
H A Dbug60367.phpt21 $method = new ReflectionMethod("b::call");
22 $method->invoke(null);
23 $method->invokeArgs(null, array());
24 $method = new ReflectionMethod("A::call");
25 $method->invoke(null);
26 $method->invokeArgs(null, array());
/PHP-8.0/Zend/tests/type_declarations/mixed/inheritance/
H A Dmixed_return_inheritance_success2.phpt8 public function method(): mixed {}
13 public function method(): bool {}
18 public function method(): int {}
23 public function method(): float {}
28 public function method(): string {}
33 public function method(): array {}
38 public function method(): object {}
43 public function method(): stdClass {}
48 public function method(): ?int {}
53 public function method(): ?stdClass {}
/PHP-8.0/Zend/tests/named_params/
H A D__call.phpt7 public function __call(string $method, array $args) {
8 $this->{'_'.$method}(...$args);
11 public static function __callStatic(string $method, array $args) {
12 (new static)->{'_'.$method}(...$args);
23 $test->method(a: 'A', b: 'B');
24 $test->method(b: 'B');
25 $test->method(b: $obj);
26 Test::method(a: 'A', b: 'B');
27 Test::method(b: 'B');
28 Test::method(b: $obj);
/PHP-8.0/Zend/tests/closures/
H A Dclosure_from_callable_basic.phpt20 echo 'Access public instance method of object';
44 echo "Instance return private method as callable";
79 echo 'Access public instance method of parent object through "self::" to parent method';
84 echo 'Access protected instance method of parent object through "self::" to parent method';
89 echo 'MagicCall __call instance method ';
93 echo 'MagicCall __callStatic static method ';
103 Access public instance method of object OK
109 Instance return private method as callable OK
110 Instance return private static method as callable OK
116 Access public instance method of parent object through "self::" to parent method OK
[all …]
/PHP-8.0/ext/standard/tests/general_functions/
H A Doutput_add_rewrite_var_basic3.phpt28 <form method="get"> </form>
29 <form action="./foo.php" method="get"> </a>
30 <form action="//php.net/bar.php" method="get"> </a>
48 <form method="get"> </form>
49 <form action="./foo.php" method="get"> </a>
50 <form action="//php.net/bar.php" method="get"> </a>
70 <form method="get"> </form>
71 <form action="./foo.php" method="get"> </a>
72 <form action="//php.net/bar.php" method="get"> </a>
87 <form action="//php.net/bar.php" method="get"> </a>
[all …]
H A Doutput_add_rewrite_var_basic4.phpt28 <form method="get"> </form>
29 <form action="./foo.php" method="get"> </a>
30 <form action="//php.net/bar.php" method="get"> </a>
48 <form method="get"> </form>
49 <form action="./foo.php" method="get"> </a>
50 <form action="//php.net/bar.php" method="get"> </a>
70 <form method="get"> </form>
71 <form action="./foo.php" method="get"> </a>
72 <form action="//php.net/bar.php" method="get"> </a>
100 <form method="get"> </form>
[all …]
/PHP-8.0/Zend/tests/traits/
H A Dbug64235b.phpt2 Bug #64235 (Insteadof not work for class method in 5.4.11)
8 public function method()
10 print_r('Parent method');
17 public function method()
19 print_r('Trait method');
28 TestTrait::method as methodAlias;
29 TestParentClass::method as TestParent;
H A Dbug64235.phpt2 Bug #64235 (Insteadof not work for class method in 5.4.11)
8 public function method()
10 print_r('Parent method');
17 public function method()
19 print_r('Trait method');
28 TestTrait::method as methodAlias;
29 TestParentClass::method insteadof TestTrait;
/PHP-8.0/Zend/tests/type_declarations/variance/
H A Dclass_order_autoload_error3.phpt9 public function method(): X {}
13 public function method(): Y {}
17 public function method(): Q {}
21 public function method(): R {}
25 public function method(): B {}
29 public function method(): A {}
38 Fatal error: Declaration of R::method(): A must be compatible with Q::method(): B in %s on line %d
/PHP-8.0/ext/standard/tests/array/
H A Darray_map_object3.phpt7 * 1) child class method using parent object
8 * 2) parent class method using child object
9 * 3) child class method using parent class
10 * 4) parent class method using child class
45 echo "-- accessing parent method from child class --\n";
48 echo "-- accessing child method from parent class --\n";
55 echo "-- accessing parent method using child class object --\n";
69 -- accessing parent method from child class --
78 -- accessing child method from parent class --
80 -- accessing parent method using child class object --
[all …]
/PHP-8.0/Zend/tests/type_declarations/
H A Diterable_005.phpt7 function method(): iterable {
13 function method(): array {
19 function method(): Traversable {
25 function method(): int {
32 Fatal error: Declaration of TestScalar::method(): int must be compatible with Test::method(): itera…

Completed in 19 milliseconds

12345678910>>...36