Home
last modified time | relevance | path

Searched refs:class (Results 151 – 175 of 4255) sorted by relevance

12345678910>>...171

/php-src/Zend/tests/
H A Dbug62814.phpt2 Bug #62814: It is possible to stiffen child class members visibility
6 class A {
10 class B extends A {
14 class C extends B {
20 Fatal error: Access level to C::test() must be protected (as in class B) or weaker in %s on line 12
H A Dbug70957.phpt2 Bug #70957 (self::class cannot be resolved with reflection for abstract class)
6 abstract class Foo
8 function bar($a = self::class) {}
16 class B extends Foo
H A Dgh7771_3.phpt2 GH-7771.3 (Incorrect file/line for class constant expression exceptions)
6 'space1\C' => 'class y{const y="$y";}',
7 'D' => 'class D{const HW=space1\C::y;}'
9 spl_autoload_register(function($class) use ($classlist) {
10 eval($classlist[$class]);
H A Dns_trailing_comma_02.phpt18 class BazFooClass {
19 function __construct() { echo "BazFoo class\n"; }
21 class BazBarClass {
22 function __construct() { echo "BazBar class\n"; }
51 BazFoo class
52 BazBar class
H A Dbug70918.phpt2 Bug #70918 (Segfault using static outside of class scope)
42 string(52) "Cannot access "static" when no class scope is active"
43 string(52) "Cannot access "parent" when no class scope is active"
44 string(50) "Cannot access "self" when no class scope is active"
45 string(52) "Cannot access "static" when no class scope is active"
46 string(52) "Cannot access "static" when no class scope is active"
47 string(52) "Cannot access "static" when no class scope is active"
H A Dclosure_065.phpt7 class ClassName {
37 class ClassName {
65 $class = new \NameSpaceName\ClassName();
66 $class->methodName();
67 $class->nestedClosure();
70 $class = new \ClassName();
71 $class->methodName();
72 $class->nestedClosure();
H A Dself_class_const_in_unknown_scope.phpt2 Use of self::class inside a constant in an unknown scope
6 class Test {
9 const FOO = self::class;
16 const BAR = self::class;
23 Fatal error: Uncaught Error: Cannot use "self" when no class scope is active in %s:%d
/php-src/ext/reflection/tests/
H A DReflectionClass_modifiers_001.phpt8 abstract class A {}
9 class B extends A {}
10 class C {}
11 final class D {}
12 readonly class E {}
17 foreach ($classes as $class) {
18 $rc = new ReflectionClass($class);
H A DReflectionMethod_getClosure_error.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' );
27 $method = $class->getMethod( 'foo' );
44 string(72) "Given object is not an instance of the class this method was declared in"
H A D022.phpt5 class Foo {
8 $class = new ReflectionClass("Foo");
9 var_dump($class->getConstant("c1"));
10 var_dump($class->getConstant("c2"));
H A D021.phpt5 class Foo {
8 $class = new ReflectionClass("Foo");
9 var_dump($class->hasConstant("c1"));
10 var_dump($class->hasConstant("c2"));
H A Dbug46064_2.phpt7 class foo {
19 class bar {
25 class test extends bar {
45 ["class"]=>
51 ["class"]=>
64 ["class"]=>
71 ["class"]=>
H A DReflectionClass_newInstance_001.phpt9 class B {
11 echo "In constructor of class B with args $a, $b\n";
15 class C {
17 echo "In constructor of class C\n";
21 class D {
23 echo "In constructor of class D\n";
27 class E {
72 In constructor of class B with args x, 123
75 Access to non-public constructor of class C
76 Access to non-public constructor of class D
/php-src/Zend/tests/anon/
H A D014.phpt2 anonymous class trait binding
10 $class = new class() {
13 var_dump($class->run());
H A D012.phpt2 Ensure correct unmangling of private property names for anonymous class instances
5 var_dump(new class { private $foo; });
8 object(class@anonymous)#1 (1) {
9 ["foo":"class@anonymous":private]=>
/php-src/ext/standard/tests/serialize/
H A Dserialization_objects_005.phpt2 Check behaviour of incomplete class
12 echo "\n\n---> Various types of access on complete class:\n" ;
32 echo "\n\n---> Same types of access on incomplete class:\n" ;
76 ---> Various types of access on complete class:
93 ---> Same types of access on incomplete class:
102class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() …
104class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() …
111class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() …
116class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() …
120class definition "C" of the object you are trying to operate on was loaded _before_ unserialize() …
[all …]
/php-src/Zend/tests/type_declarations/dnf_types/variance/
H A Dinvalid_invariance2.phpt8 class A implements X, Y {}
9 class B {}
11 class Test {
14 class Test2 extends Test {
21 Fatal error: Type of Test2::$prop must be (X&Y)|B (as in class Test) in %s on line %d
/php-src/Zend/tests/type_declarations/union_types/variance/
H A Dinvalid_003.phpt2 Invalid union type variance: Using parent of class in return type
6 class X {}
7 class Y extends X {}
9 class A {
12 class B extends A {
/php-src/ext/spl/tests/
H A Dbug75242.phpt2 Bug #75242: RecursiveArrayIterator doesn't have constants from parent class
6 class Foo extends ArrayIterator { }
8 $r = new ReflectionClass(Foo::class);
10 $r = new ReflectionClass(ArrayIterator::class);
12 $r = new ReflectionClass(RecursiveArrayIterator::class);
/php-src/tests/classes/
H A Dinheritance.phpt8 class foo {
12 echo "This is class foo\n";
21 class bar extends foo {
23 function display() { /* alternative display function for class bar */
24 echo "This is class bar\n";
48 This is class foo
53 This is class bar
/php-src/Zend/tests/attributes/
H A D031_backtrace.phpt7 class MyAttribute {
16 class Test {}
18 (new ReflectionClass(Test::class))->getAttributes()[0]->newInstance();
33 ["class"]=>
52 ["class"]=>
75 ["class"]=>
91 ["class"]=>
/php-src/ext/date/tests/
H A DDateTimeZone_clone_basic2.phpt2 Testing clone on objects whose class derived from DateTimeZone class
8 class DateTimeZoneExt1 extends DateTimeZone {
13 class DateTimeZoneExt2 extends DateTimeZoneExt1 {
18 echo "*** Testing clone on objects whose class derived from DateTimeZone class ***\n";
32 *** Testing clone on objects whose class derived from DateTimeZone class ***
H A DDateTime_clone_basic2.phpt2 Test clone of objects whose class derived from DateTime class
8 class DateTimeExt1 extends DateTime {
14 class DateTimeExt2 extends DateTimeExt1 {
19 echo "*** Testing clone on objects whose class derived from DateTime class ***\n";
32 *** Testing clone on objects whose class derived from DateTime class ***
/php-src/ext/json/tests/
H A Dserialize.phpt8 class NonSerializingTest
18 class SerializingTest extends NonSerializingTest implements JsonSerializable
26 class ValueSerializingTest extends SerializingTest
34 class SelfSerializingTest extends SerializingTest
56 …y('NonSerializingTest','SerializingTest','ValueSerializingTest','SelfSerializingTest') as $class) {
57 echo "==$class==\n";
58 echo json_encode(new $class($adata)), "\n";
59 echo json_encode(new $class($ndata)), "\n";
60 echo json_encode(new $class($odata)), "\n";
/php-src/Zend/tests/type_declarations/variance/
H A Dabstract_constructor.phpt5 class X {
7 abstract class A {
10 class B extends A {
13 class C extends B {
18 …patibility between C::__construct(Y $x) and A::__construct(X $x), because class Y is not available…

Completed in 28 milliseconds

12345678910>>...171