Home
last modified time | relevance | path

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

12345678910>>...135

/PHP-7.4/ext/reflection/tests/
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 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);
H A DReflectionClass_isIterateable_basic.phpt8 class IteratorClass implements Iterator {
16 class DerivedClass extends IteratorClass {}
17 class NonIterator {}
19 function dump_iterateable($class) {
20 $reflection = new ReflectionClass($class);
25 foreach ($classes as $class) {
26 echo "Is $class iterateable? ";
27 dump_iterateable($class);
H A DReflectionObject_isInstantiable_basic.phpt5 class C {
12 class ifaceImpl implements iface {
16 abstract class abstractClass {
21 class D extends abstractClass {
27 foreach($classes as $class ) {
28 $ro = new ReflectionObject(new $class);
29 echo "Is $class instantiable? ";
H A DReflectionMethod_getClosure_basic.phpt13 class StaticExample
17 var_dump( "Static Example class, Hello World!" );
21 class Example
26 var_dump( "Example class, bar: " . $this->bar );
31 $class = new ReflectionClass( 'Example' );
41 $method = $class->getMethod( 'foo' );
52 string(34) "Static Example class, Hello World!"
53 string(22) "Example class, bar: 42"
54 string(22) "Example class, bar: 34"
H A DReflectionClass_isInstantiable_basic.phpt5 class C {
12 class ifaceImpl implements iface {
16 abstract class abstractClass {
21 class D extends abstractClass {
27 foreach($classes as $class ) {
28 $reflectionClass = new ReflectionClass($class);
29 echo "Is $class instantiable? ";
H A Dbug38217.phpt6 class ObjectOne {
11 $class= new ReflectionClass('ObjectOne');
12 var_dump($class->newInstanceArgs());
14 class ObjectTwo {
20 $class= new ReflectionClass('ObjectTwo');
22 var_dump($class->newInstanceArgs());
26 var_dump($class->newInstanceArgs(array('test')));
H A Dtraits004.phpt8 class C1 { }
9 class C2 { use T1; }
10 class C3 { use T1; use T2; }
13 echo "class $c:\n";
20 class C1:
26 class C2:
39 class C3:
/PHP-7.4/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-7.4/ext/standard/tests/array/
H A Darray_map_object2.phpt2 Test array_map() function : object functionality - with non-existent class and method
12 * 1) non-existent class
13 * 2) existent class and non-existent function
15 echo "*** Testing array_map() : with non-existent class and method ***\n";
17 class SimpleClass
28 echo "-- with non-existent class --\n";
31 echo "-- with existent class and non-existent method --\n";
37 *** Testing array_map() : with non-existent class and method ***
38 -- with non-existent class --
40 Warning: array_map() expects parameter 1 to be a valid callback, class 'non-existent' not found in …
[all …]
H A Dcompact_this.phpt7 (new class {
15 (new class {
23 (new class {
34 object(class@anonymous)#1 (0) {
39 object(class@anonymous)#1 (0) {
44 object(class@anonymous)#1 (0) {
/PHP-7.4/Zend/tests/
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]=>
H A Dbug69754.phpt2 Bug #69754 (Use of ::class inside array causes compile error)
6 class Example {
8 var_dump(static::class);
9 var_dump(static::class . 'IsAwesome');
10 var_dump(static::class . date('Ymd'));
11 var_dump([static::class]);
H A Dclass_name_as_scalar_error_003.phpt2 class name as scalar from ::class keyword error using static in method signature
7 class One {
8 public function baz($x = static::class) {}
13 Fatal error: static::class cannot be used for compile-time class name resolution in %s on line %d
H A Dclass_name_as_scalar_error_002.phpt2 class name as scalar from ::class keyword error using parent in class constant
7 class One {
8 const Baz = parent::class;
14 Deprecated: Cannot use "parent" when current class scope has no parent in %s on line %d
16 Fatal error: Uncaught Error: Cannot use "parent" when current class scope has no parent in %s:%d
H A Dbug66719.phpt6 class A
13 class B extends A
21 class C
25 call_user_func(array(A::class, 'who'));
26 call_user_func(array(B::class, 'parent::who'));
31 call_user_func(array(A::class, 'who'));
32 call_user_func(array(B::class, 'parent::who'));
H A Dclass_name_as_scalar_error_007.phpt2 Cannot access self::class when no class scope is active
7 var_dump(self::class);
12 var_dump([self::class]);
19 Cannot use "self" when no class scope is active
20 Cannot use "self" when no class scope is active
H A Dname_collision_01.phpt2 Object naming collision error: class/class
6 class A { }
7 class A { }
11 Fatal error: Cannot declare class A, because the name is already in use in %s on line %d
/PHP-7.4/ext/standard/tests/class_object/
H A Dclass_exists_basic_001.phpt6 * Description: Checks if the class exists
17 echo "Calling class_exists() on non-existent class with autoload explicitly enabled:\n";
19 echo "\nCalling class_exists() on existing class with autoload explicitly enabled:\n";
27 echo "\nCalling class_exists() on non-existent class with autoload unspecified:\n";
29 echo "\nCalling class_exists() on existing class with autoload unspecified:\n";
36 Calling class_exists() on non-existent class with autoload explicitly enabled:
40 Calling class_exists() on existing class with autoload explicitly enabled:
43 Calling class_exists() on non-existent class with autoload explicitly enabled:
46 Calling class_exists() on existing class with autoload explicitly disabled:
49 Calling class_exists() on non-existent class with autoload unspecified:
[all …]
/PHP-7.4/ext/opcache/tests/
H A Dpreload_variance.inc5 class A extends Z {
8 class B extends Z {
13 class C extends Z {
17 class D extends C {
25 class E {
28 class F extends E {
33 class G {
36 class H extends G {
41 class Z {
/PHP-7.4/Zend/tests/type_declarations/variance/
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 {
H A Dparent_in_class_success.phpt2 Use of parent inside a class that has / has no parent (success cases)
7 class P2 {}
8 class A2 extends P2 {
11 class B2 extends A2 {
16 class P3 {}
17 class A3 extends P3 {
20 class B3 extends A3 {
/PHP-7.4/ext/json/tests/
H A Dbug71835.phpt7 class SomeClass implements JsonSerializable {
12 $class = new SomeClass;
13 $arr = [$class];
16 class SomeClass2 implements JsonSerializable {
21 $class = new SomeClass2;
22 $arr = [$class];

Completed in 46 milliseconds

12345678910>>...135