mirror of
https://github.com/php/php-langspec.git
synced 2026-03-24 15:22:08 +01:00
30 lines
816 B
PHP
30 lines
816 B
PHP
--TEST--
|
|
PHP Spec test generated from ./classes/using_class_declarations.php
|
|
--FILE--
|
|
<?php
|
|
|
|
/*
|
|
+-------------------------------------------------------------+
|
|
| Copyright (c) 2014 Facebook, Inc. (http://www.facebook.com) |
|
|
+-------------------------------------------------------------+
|
|
*/
|
|
|
|
/*
|
|
+-------------------------------------------------------------+
|
|
| Copyright (c) 2014 Facebook, Inc. (http://www.facebook.com) |
|
|
+-------------------------------------------------------------+
|
|
*/
|
|
|
|
error_reporting(-1);
|
|
|
|
new C1; // OK; finds a forward declaration
|
|
//new D1; // Fatal error: Class 'D' not found
|
|
|
|
class D1 extends C1 {}
|
|
class C1 {}
|
|
|
|
//class C2 implements I2 {} // Fatal error: Interface 'I2' not found
|
|
interface I2 extends I1 {} // OK; finds a forward declaration
|
|
interface I1 {}
|
|
--EXPECT--
|