Home
last modified time | relevance | path

Searched refs:class (Results 51 – 75 of 3743) sorted by relevance

12345678910>>...150

/php-src/Zend/tests/anon/
H A D013.phpt2 closure binding to anonymous class
5 $class = new class {};
10 $closure = Closure::bind($foo, $class, $class);
14 object(class@anonymous)#1 (0) {
/php-src/ext/standard/tests/array/
H A Darray_map_object2.phpt2 Test array_map() function : object functionality - with non-existent class and method
7 * 1) non-existent class
8 * 2) existent class and non-existent function
10 echo "*** Testing array_map() : with non-existent class and method ***\n";
12 class SimpleClass
23 echo "-- with non-existent class --\n";
30 echo "-- with existent class and non-existent method --\n";
40 *** Testing array_map() : with non-existent class and method ***
41 -- with non-existent class --
42 array_map(): Argument #1 ($callback) must be a valid callback or null, class "non-existent" not fou…
[all …]
/php-src/ext/reflection/tests/
H A DReflectionClass_getReflectionConstants_filter.phpt5 class A {
12 class B {
19 class C {
26 $reflectionClassA = new ReflectionClass(A::class);
29 $reflectionClassB = new ReflectionClass(B::class);
41 ["class"]=>
48 ["class"]=>
57 ["class"]=>
64 ["class"]=>
73 ["class"]=>
[all …]
H A DReflectionClass_toString_003.phpt20 foreach (array('A', 'B', 'C', 'D') as $class) {
21 echo "\n\n----( Reflection class $class: )----\n";
22 $rc = new ReflectionClass($class);
28 ----( Reflection class A: )----
29 Class [ <user> class A ] {
52 ----( Reflection class B: )----
53 Class [ <user> class B extends A ] {
76 ----( Reflection class C: )----
77 Class [ <user> class C extends B ] {
97 ----( Reflection class D: )----
[all …]
H A Dbug26695.phpt2 Reflection Bug #26695 (Reflection API does not recognize mixed-case class hints)
6 class Foo {
9 class Bar {
14 $class = new ReflectionClass('bar');
15 $methods = $class->getMethods();
18 $class = $params[0]->getClass();
20 var_dump($class->getName());
H A DReflectionMethod_getClosure_basic.phpt7 class StaticExample
11 var_dump( "Static Example class, Hello World!" );
15 class Example
20 var_dump( "Example class, bar: " . $this->bar );
25 $class = new ReflectionClass( 'Example' );
35 $method = $class->getMethod( 'foo' );
45 string(34) "Static Example class, Hello World!"
46 string(22) "Example class, bar: 42"
47 string(22) "Example class, bar: 34"
H A DReflectionClass_hasMethod_001.phpt8 class pubf {
12 class subpubf extends pubf {
15 class protf {
19 class subprotf extends protf {
22 class privf {
26 class subprivf extends privf {
31 foreach($classes as $class) {
32 echo "Reflecting on class $class: \n";
45 Reflecting on class pubf:
55 Reflecting on class protf:
[all …]
H A DReflectionClass_hasProperty_001.phpt8 class pubf {
12 class subpubf extends pubf {
15 class protf {
19 class subprotf extends protf {
22 class privf {
26 class subprivf extends privf {
31 foreach($classes as $class) {
32 echo "Reflecting on class $class: \n";
45 Reflecting on class pubf:
55 Reflecting on class protf:
[all …]
H A DReflectionClass_toString_002.phpt20 foreach (array('A', 'B', 'C', 'D') as $class) {
21 echo "\n\n----( Reflection class $class: )----\n";
22 $rc = new ReflectionClass($class);
28 ----( Reflection class A: )----
29 Class [ <user> class A ] {
52 ----( Reflection class B: )----
53 Class [ <user> class B extends A ] {
76 ----( Reflection class C: )----
77 Class [ <user> class C extends B ] {
100 ----( Reflection class D: )----
[all …]
H A DReflectionProperty_getDefaultValue.phpt9 class TestClass
27 $property = new ReflectionProperty(TestClass::class, 'foo');
30 $property = new ReflectionProperty(TestClass::class, 'bar');
33 $property = new ReflectionProperty(TestClass::class, 'static1');
36 $property = new ReflectionProperty(TestClass::class, 'static2');
39 $property = new ReflectionProperty(TestClass::class, 'val1');
42 $property = new ReflectionProperty(TestClass::class, 'val2');
45 $property = new ReflectionProperty(TestClass::class, 'nullable');
48 $property = new ReflectionProperty(TestClass::class, 'nullable2');
51 $property = new ReflectionProperty(TestClass::class, 'constantAst');
[all …]
H A DReflectionClass_isInstantiable_variation.phpt5 class noCtor {
8 class publicCtorNew {
12 class protectedCtorNew {
16 class privateCtorNew {
21 foreach ($classes as $class) {
22 $reflectionClass = new ReflectionClass($class);
23 echo "Is $class instantiable? ";
H A DReflectionClass_getModifiers_basic.phpt8 class a {}
9 abstract class b {}
10 final class c {}
12 class e implements d {}
14 class g extends b {}
16 function dump_modifiers($class) {
17 $obj = new ReflectionClass($class);
/php-src/Zend/tests/
H A Dbug60573_2.phpt5 class Foo1 {
11 class Bar1 extends Foo1 {
17 class Foo2 {
23 class Bar2 extends Foo2 {
29 class Base {
32 class Foo3 extends Base{
38 class Bar3 extends Foo3 {
44 class Foo4 {
50 class Foo5 extends Base {
56 class Bar5 extends Foo5 {
H A Dbug60573.phpt5 class Foo1 {
11 class Bar1 extends Foo1 {
17 class Foo2 {
23 class Bar2 extends Foo2 {
29 class Base {
32 class Foo3 extends Base{
38 class Bar3 extends Foo3 {
44 class Foo4 {
50 class Bar4 extends Foo4 {
H A Dbug73816.phpt2 Bug #73816: Broken eval(anonymous class)
9 return eval(sprintf('return new class { private $prop%s; };', ++$i));
17 object(class@anonymous)#1 (1) {
18 ["prop1":"class@anonymous":private]=>
21 object(class@anonymous)#1 (1) {
22 ["prop2":"class@anonymous":private]=>
/php-src/tests/lang/
H A D032.phpt5 class A {
9 class B extends A {
13 class C extends B {
17 class D extends A {
20 class F extends D {
24 // Following class definition should fail, but cannot test
26 class X {
/php-src/Zend/tests/type_declarations/variance/
H A Denum_forward_compat.phpt6 spl_autoload_register(function($class) {
7 var_dump($class);
8 if ($class === 'X') {
9 class X {}
11 class Y {}
15 class A {
19 class B extends A {
H A Dclass_order_autoload_error7.phpt6 spl_autoload_register(function ($class) {
7 if ($class == 'A') {
8 class A {
11 } elseif ($class == 'B') {
12 class B extends A {
16 class C extends B {}
24 Fatal error: Could not check compatibility between B::m(): X and A::m(): B, because class X is not …
H A Dloading_exception2.phpt2 Exception while loading class -- interface case
6 spl_autoload_register(function($class) {
7 throw new Exception("Class $class does not exist");
10 class A {}
15 class B extends A implements I {
24 spl_autoload_register(function($class) {
26 class X {
29 class Y extends X {
34 // Fallback to fatal error, as we can't unlink class B anymore.
36 class B extends A implements I, J {
/php-src/ext/opcache/tests/
H A Dpreload_loadable_classes_1.inc3 spl_autoload_register(function($class) {
4 if ($class == 'Bar') {
5 class Bar {
11 } else if ($class == 'Foo') {
12 class Foo {}
16 class Test {
/php-src/Zend/tests/readonly_classes/
H A Dreadonly_class_inheritance_error1.phpt2 Non-readonly class cannot extend a readonly class
6 readonly class Foo
10 class Bar extends Foo
16 Fatal error: Non-readonly class Bar cannot extend readonly class Foo in %s on line %d
H A Dreadonly_class_inheritance_error2.phpt2 Readonly class cannot extend a non-readonly class
6 class Foo
10 readonly class Bar extends Foo
16 Fatal error: Readonly class Bar cannot extend non-readonly class Foo in %s on line %d
/php-src/Zend/tests/grammar/
H A Dregression_003.phpt2 Test to ensure ::class is still reserved in obj scope
6 class Obj
8 const CLASS = 'class';
13 Fatal error: A class constant must not be called 'class'; it is reserved for class name fetching in…
/php-src/ext/standard/tests/class_object/
H A Dclass_exists_basic_001.phpt11 echo "Calling class_exists() on non-existent class with autoload explicitly enabled:\n";
13 echo "\nCalling class_exists() on existing class with autoload explicitly enabled:\n";
18 echo "\nCalling class_exists() on existing class with autoload explicitly disabled:\n";
21 echo "\nCalling class_exists() on non-existent class with autoload unspecified:\n";
23 echo "\nCalling class_exists() on existing class with autoload unspecified:\n";
30 Calling class_exists() on non-existent class with autoload explicitly enabled:
34 Calling class_exists() on existing class with autoload explicitly enabled:
37 Calling class_exists() on non-existent class with autoload explicitly enabled:
40 Calling class_exists() on existing class with autoload explicitly disabled:
43 Calling class_exists() on non-existent class with autoload unspecified:
[all …]
H A Dget_class_methods_variation_001.phpt69 // loop through each element of the array for class
87 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, int gi…
90 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, int gi…
93 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, int gi…
96 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, int gi…
99 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, float …
102 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, float …
105 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, float …
108 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, float …
111 get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, float …
[all …]

Completed in 25 milliseconds

12345678910>>...150