mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
39 lines
645 B
PHP
39 lines
645 B
PHP
--TEST--
|
|
Bug #35634 (Erroneous "Class declarations may not be nested" error raised)
|
|
--INI--
|
|
error_reporting=0
|
|
--FILE--
|
|
<?php
|
|
if (defined("pass3")) {
|
|
|
|
class ErrorClass {
|
|
}
|
|
|
|
} else if (defined("pass2")) {
|
|
|
|
class TestClass {
|
|
function __construct() {
|
|
}
|
|
function TestClass() {
|
|
$this->__construct();
|
|
}
|
|
}
|
|
|
|
} else {
|
|
|
|
function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) {
|
|
define("pass3", 1);
|
|
include(__FILE__);
|
|
die("Error: $errorMessage ($fileName:$lineNumber)\n");
|
|
}
|
|
|
|
set_error_handler('errorHandler');
|
|
define("pass2", 1);
|
|
include(__FILE__);
|
|
print "ok\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
ok
|