Home
last modified time | relevance | path

Searched refs:class (Results 76 – 100 of 3494) sorted by relevance

12345678910>>...140

/PHP-7.4/Zend/tests/type_declarations/
H A Dparent_is_not_proto.phpt2 The parent class is not necessarily the class of the prototype
6 class A {
9 class B extends A {}
10 class C extends B {
H A Dtyped_properties_038.phpt6 $foo = new class {
42 string(82) "Cannot increment property class@anonymous::$bar of type int past its maximal value"
43 object(class@anonymous)#1 (1) {
47 string(60) "Typed property class@anonymous::$bar must be int, float used"
48 object(class@anonymous)#1 (1) {
52 string(82) "Cannot increment property class@anonymous::$bar of type int past its maximal value"
53 object(class@anonymous)#1 (1) {
57 string(60) "Typed property class@anonymous::$bar must be int, float used"
58 object(class@anonymous)#1 (1) {
H A Dtyped_properties_007.phpt5 class Whatever {}
6 class Thing extends Whatever {}
8 class Foo {
12 class Bar extends Foo {
17 Fatal error: Type of Bar::$qux must be Whatever (as in class Foo) in %s on line 11
/PHP-7.4/tests/classes/
H A Dconstants_basic_002.phpt2 Basic class support - defining and reading a class constant.
5 class aclass
10 echo "\nRead class constant.\n";
13 echo "\nFail to read class constant from instance.\n";
21 Read class constant.
24 Fail to read class constant from instance.
/PHP-7.4/Zend/tests/type_declarations/variance/
H A Dclass_order_autoload_error1.phpt6 spl_autoload_register(function($class) {
7 if ($class === 'A') {
8 class A {
11 } else if ($class == 'B') {
12 class B extends A {
16 class C extends B {
H A Dclass_order_autoload1.phpt6 spl_autoload_register(function($class) {
7 if ($class === 'A') {
8 class A {
12 } else if ($class == 'B') {
13 class B extends A {
18 class C extends B {
H A Dloading_exception1.phpt2 Exception while loading class -- parent case
6 spl_autoload_register(function($class) {
7 throw new Exception("Class $class does not exist");
13 class B extends A {
22 spl_autoload_register(function($class) {
24 class X {
27 class Y extends X {
32 // Fallback to fatal error, as we can't unlink class B anymore.
34 class B extends A implements I {
H A Dclass_order_autoload4.phpt7 spl_autoload_register(function($class) {
8 if ($class == 'A') {
9 class A {
13 } else if ($class == 'B') {
14 class B extends A {
18 } else if ($class == 'X') {
23 } else if ($class == 'Y') {
H A Dclass_order_autoload2.phpt6 spl_autoload_register(function($class) {
7 if ($class === 'A') {
8 class A {
12 } else if ($class == 'B') {
13 class B extends A {
18 class C extends B {
/PHP-7.4/ext/reflection/tests/
H A DReflectionClass_newInstanceArgs_001.phpt8 class A {
10 echo "In constructor of class A\n";
14 class B {
20 class C {
22 echo "In constructor of class C\n";
26 class D {
28 echo "In constructor of class D\n";
31 class E {
89 In constructor of class A
92 In constructor of class A
[all …]
H A DReflectionClass_newInstance_001.phpt8 class A {
10 echo "In constructor of class A\n";
14 class B {
20 class C {
22 echo "In constructor of class C\n";
26 class D {
28 echo "In constructor of class D\n";
31 class E {
82 In constructor of class A
83 In constructor of class A
[all …]
H A Dbug78895.phpt2 Fixed bug #78895 (Reflection detects abstract non-static class as abstract static).
5 abstract class Foo {
14 class Bar extends Foo implements I {
19 $ref = new ReflectionClass(Foo::class);
21 $ref = new ReflectionClass(I::class);
23 $ref = new ReflectionClass(T::class);
25 $ref = new ReflectionClass(Bar::class);
H A DReflectionClass_isCloneable_001.phpt8 class foo {
12 print "User class\n";
19 class bar {
24 print "User class - private __clone\n";
39 print "Internal class - SimpleXMLElement\n";
46 print "Internal class - XMLWriter\n";
55 User class
58 User class - private __clone
64 Internal class - SimpleXMLElement
67 Internal class - XMLWriter
[all …]
/PHP-7.4/Zend/tests/
H A Dbug31102.phpt8 spl_autoload_register(function ($class) {
11 echo __METHOD__ . "($class,$test)\n";
15 eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
18 eval("class $class { function __construct(){throw new Exception('$class::__construct');}}");
H A D025.phpt6 class foo {
15 $class = 'foo';
21 $class::a();
22 $class::$a();
23 $class::$$b();
H A Dbug71922.phpt2 Bug #71922: Crash on assert(new class{});
10 assert(0 && new class {
11 } && new class(42) extends stdclass {
19 Assertion failure: assert(0 && new class {
20 } && new class(42) extends stdclass {
H A Dclass_name_as_scalar_error_004.phpt2 class name as scalar from ::class keyword error using parent in method signature
7 class One {}
8 class Two extends One {
9 public function baz($x = parent::class) {
H A Dbug32322.phpt7 class test
14 echo "New class $value created \n";
37 echo "Using old class " . $instance2 -> myname . "\n";
51 echo "Try static instance inside class :\n";
67 Try static instance inside class :
68 New class Singleton1 created
69 Using old class Singleton1
72 Using old class Singleton1
74 New class Singleton2 created
75 Using old class Singleton2
[all …]
H A Dbug37632.phpt6 class A1
14 class B1 extends A1
23 class C1 extends A1
34 class A2
42 class B2 extends A2
51 class C2 extends A2
78 class B3 extends A3
87 class C3 extends A3
99 class A4
107 class B4 extends A4
[all …]
H A Dbug52051.phpt6 class AA {
9 class bb extends AA {}
10 class CC extends bb {
15 class A {
18 class B extends A {}
19 class C extends B {
26 Deprecated: Methods with the same name as their class will not be constructors in a future version …
28 Deprecated: Methods with the same name as their class will not be constructors in a future version …
30 Deprecated: Methods with the same name as their class will not be constructors in a future version …
32 Deprecated: Methods with the same name as their class will not be constructors in a future version …
H A Dclass_name_as_scalar_error_005.phpt2 class name as scalar from ::class keyword error using static non class context
6 $x = static::class;
10 Fatal error: Uncaught Error: Cannot use "static" when no class scope is active in %s:3
H A Dclass_name_as_scalar_error_006.phpt2 class name as scalar from ::class keyword error using parent in non class context
6 $x = parent::class;
10 Fatal error: Uncaught Error: Cannot use "parent" when no class scope is active in %s:3
H A Dconstant_expressions_classes.phpt14 'A'=> 'class A { const HW = "this is A"; }',
15 'B'=> 'class B extends A { const HW = parent::HW." extended by B"; }',
16 'space1\C' => 'namespace space1; class C { const HW = "this is space1\C"; }',
17 'D' => 'class D { const HW = \space1\C::HW." extented by D"; }',
19 'E' => 'class E extends B { use trE; }',
20 'F' => 'class F { const XX = "this is F"; }',
21 …'G' => 'class G extends F { const XX = parent::XX." extended by G"; public static function get_me(…
24 spl_autoload_register(function ($class) use ($classlist) {
25 if (isset($classlist[$class])) {
26 eval($classlist[$class]);
[all …]
/PHP-7.4/Zend/tests/object_types/
H A Dreturn_type_inheritance_in_class.phpt2 Adding class method a object return type during inheritance is allowed
6 class One {
10 class Two extends One {
14 $three = new class extends Two {
21 Fatal error: Uncaught TypeError: Return value of class@anonymous::a() must be an object, int return…
23 #0 %s(16): class@anonymous->a()
/PHP-7.4/Zend/tests/try/
H A Dexceptions.inc3 class Exception1 extends Exception {}
4 class Exception2 extends Exception {}
5 class Exception3 extends Exception {}
6 class Exception4 extends Exception {}

Completed in 65 milliseconds

12345678910>>...140