Description
Found while working on #14440
The following code:
<?phpclass PrivateUser {
privatefunction__construct() {
returnnewstdClass();
}
publicfunction__destruct() {
echo'Destructor for ', __CLASS__, PHP_EOL;
}
}
newPrivateUser();Resulted in this output:
Destructor for PrivateUser
Fatal error: Uncaught Error: Call to private PrivateUser::__construct() from global scope in /in/EF0hE:12
Stack trace:
#0 {main}
thrown in /in/EF0hE on line 12
But I expected this output instead:
Fatal error: Uncaught Error: Call to private PrivateUser::__construct() from global scope in /in/EF0hE:12
Stack trace:
#0 {main}
thrown in /in/EF0hE on line 12
PHP Version
master
Operating System
No response
Description
Found while working on #14440
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
master
Operating System
No response