Skip to content

Commit

Permalink
Tweak uncaught exception message display
Browse files Browse the repository at this point in the history
This implements a reduced variant of php#1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
  • Loading branch information
nikic committed May 17, 2015
1 parent 0df2f47 commit 3ae995f
Show file tree
Hide file tree
Showing 366 changed files with 403 additions and 403 deletions.
2 changes: 1 addition & 1 deletion Zend/tests/028.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool(true)

Notice: Undefined offset: 2 in %s on line %d

Fatal error: Uncaught exception 'EngineException' with message 'Function name must be a string' in %s:%d
Fatal error: Uncaught EngineException: Function name must be a string in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/037.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var_dump($x::$x);
--EXPECTF--
int(1)

Fatal error: Uncaught exception 'EngineException' with message 'Access to undeclared static property: Closure::$x' in %s:%d
Fatal error: Uncaught EngineException: Access to undeclared static property: Closure::$x in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/access_modifiers_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ new c;

?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Call to private method d::test2() from context 'a'' in %s:%d
Fatal error: Uncaught EngineException: Call to private method d::test2() from context 'a' in %s:%d
Stack trace:
#0 %s(%d): a->test()
#1 %s(%d): c->__construct()
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/add_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Exception: Unsupported operand types

Notice: Object of class stdClass could not be converted to int in %s on line %d

Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/add_003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Exception: Unsupported operand types

Notice: Object of class stdClass could not be converted to int in %s on line %d

Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/add_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types

Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/add_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
Exception: Unsupported operand types

Fatal error: Uncaught exception 'EngineException' with message 'Unsupported operand types' in %s:%d
Fatal error: Uncaught EngineException: Unsupported operand types in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/assert/expect_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assert(false);
var_dump(true);
?>
--EXPECTF--
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_002.php:%d
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_002.php:%d
Stack trace:
#0 %sexpect_002.php(%d): assert(false, 'assert(false)')
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/assert/expect_007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HeaderMalfunctionException extends AssertionException {}
assert (preg_match("~^([a-zA-Z0-9-]+)$~", $data["key"]), new HeaderMalfunctionException("malformed key found at {$next} \"{$data["key"]}\""));
?>
--EXPECTF--
Fatal error: Uncaught exception 'HeaderMalfunctionException' with message 'malformed key found at 1 "X-HTTP "' in %sexpect_007.php:10
Fatal error: Uncaught HeaderMalfunctionException: malformed key found at 1 "X-HTTP " in %sexpect_007.php:10
Stack trace:
#0 {main}
thrown in %sexpect_007.php on line 10
2 changes: 1 addition & 1 deletion Zend/tests/assert/expect_009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Two extends One {
new Two();
?>
--EXPECTF--
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_009.php:%d
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_009.php:%d
Stack trace:
#0 %sexpect_009.php(%d): assert(false, 'assert(false)')
#1 %sexpect_009.php(%d): Two->__construct()
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/assert/expect_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Two extends One {}
new Two();
?>
--EXPECTF--
Fatal error: Uncaught exception 'AssertionException' with message 'assert(false)' in %sexpect_010.php:%d
Fatal error: Uncaught AssertionException: assert(false) in %sexpect_010.php:%d
Stack trace:
#0 %sexpect_010.php(%d): assert(false, 'assert(false)')
#1 %sexpect_010.php(%d): One->__construct()
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/assert/expect_011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Two extends One {}
new Two();
?>
--EXPECTF--
Fatal error: Uncaught exception 'AssertionException' with message '[Message]: MyExpectations' in %sexpect_011.php:%d
Fatal error: Uncaught AssertionException: [Message]: MyExpectations in %sexpect_011.php:%d
Stack trace:
#0 %sexpect_011.php(%d): assert(false, '[Message]: MyEx...')
#1 %sexpect_011.php(%d): One->__construct()
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug24773.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Bug #24773 (unset() of integers treated as arrays causes a crash)
unset($array["lvl1"]["lvl2"]["b"]);
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an array' in %s:%d
Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug29015.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $a->$x = "string('')";
var_dump($a);
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot access empty property' in %sbug29015.php:4
Fatal error: Uncaught EngineException: Cannot access empty property in %sbug29015.php:4
Stack trace:
#0 {main}
thrown in %sbug29015.php on line 4
2 changes: 1 addition & 1 deletion Zend/tests/bug29674.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ NULL
===CHILD===
string(4) "Base"

Fatal error: Uncaught exception 'EngineException' with message 'Cannot access private property ChildClass::$private_child' in %sbug29674.php:%d
Fatal error: Uncaught EngineException: Cannot access private property ChildClass::$private_child in %sbug29674.php:%d
Stack trace:
#0 %s(%d): BaseClass->printVars()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug31102.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ __autoload(Test2,2)
Caught: __autoload
__autoload(Test3,3)

Fatal error: Uncaught exception 'EngineException' with message 'Class 'Test3' not found' in %sbug31102.php(%d) : eval()'d code:1
Fatal error: Uncaught EngineException: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1
Stack trace:
#0 %s(%d): eval()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug32660.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A Object

Notice: Indirect modification of overloaded property A::$whatever has no effect in %sbug32660.php on line 23

Fatal error: Uncaught exception 'EngineException' with message 'Cannot assign by reference to overloaded object' in %sbug32660.php:23
Fatal error: Uncaught EngineException: Cannot assign by reference to overloaded object in %sbug32660.php:23
Stack trace:
#0 {main}
thrown in %sbug32660.php on line 23
2 changes: 1 addition & 1 deletion Zend/tests/bug33318.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bug #33318 (throw 1; results in Invalid opcode 108/1/8)
throw 1;
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Can only throw objects' in %sbug33318.php:2
Fatal error: Uncaught EngineException: Can only throw objects in %sbug33318.php:2
Stack trace:
#0 {main}
thrown in %sbug33318.php on line 2
2 changes: 1 addition & 1 deletion Zend/tests/bug34064.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ array(1) {
string(2) "ok"
}

Fatal error: Uncaught exception 'EngineException' with message 'Cannot use [] for reading' in %sbug34064.php:18
Fatal error: Uncaught EngineException: Cannot use [] for reading in %sbug34064.php:18
Stack trace:
#0 %s(%d): XmlTest->run()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug36071.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $a = clone 0;
$a[0]->b = 0;
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug36071.php:2
Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug36071.php:2
Stack trace:
#0 {main}
thrown in %sbug36071.php on line 2
2 changes: 1 addition & 1 deletion Zend/tests/bug36268.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $x = new Foo();
bar();
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined function bar()' in %sbug36268.php:8
Fatal error: Uncaught EngineException: Call to undefined function bar() in %sbug36268.php:8
Stack trace:
#0 {main}
thrown in %sbug36268.php on line 8
2 changes: 1 addition & 1 deletion Zend/tests/bug37632.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ B2::doTest
C2::test
B4::doTest

Fatal error: Uncaught exception 'EngineException' with message 'Call to protected C4::__construct() from context 'B4'' in %sbug37632.php:%d
Fatal error: Uncaught EngineException: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d
Stack trace:
#0 %s(%d): B4::doTest()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug38624.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $impl = new impl();
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'Exception' with message 'doesn't work' in %s:%d
Fatal error: Uncaught Exception: doesn't work in %s:%d
Stack trace:
#0 %s(%d): impl->__get('counter')
#1 %s(%d): impl->__construct()
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug40621.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo "Done\n";
--EXPECTF--
Deprecated: Non-static method Foo::get() should not be called statically in %s on line %d

Fatal error: Uncaught exception 'EngineException' with message 'Non-static method Foo::__construct() cannot be called statically' in %s:%d
Fatal error: Uncaught EngineException: Non-static method Foo::__construct() cannot be called statically in %s:%d
Stack trace:
#0 %s(%d): Foo::get()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug41209.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var_dump(isset($cache[$id]));
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: id' in %s:%d
Fatal error: Uncaught ErrorException: Undefined variable: id in %s:%d
Stack trace:
#0 %s(%d): env::errorHandler(8, '%s', '%s', 34, Array)
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug41421.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "Done\n";
--EXPECTF--
Warning: feof(): wrapper::stream_eof is not implemented! Assuming EOF in %s on line %d

Fatal error: Uncaught exception 'Exception' in %s:%d
Fatal error: Uncaught Exception in %s:%d
Stack trace:
#0 [internal function]: wrapper->stream_eof()
#1 %s(%d): feof(Resource id #%d)
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug41633_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Foo {
echo Foo::A."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined class constant 'self::B'' in %sbug41633_2.php:5
Fatal error: Uncaught EngineException: Undefined class constant 'self::B' in %sbug41633_2.php:5
Stack trace:
#0 {main}
thrown in %sbug41633_2.php on line 5
2 changes: 1 addition & 1 deletion Zend/tests/bug41633_3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Foo {
echo Foo::A;
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot declare self-referencing constant 'Foo::B'' in %sbug41633_3.php:%d
Fatal error: Uncaught EngineException: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d
Stack trace:
#0 {main}
thrown in %sbug41633_3.php on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug41813.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $foo[0]->bar = "xyz";
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an array' in %s:%d
Fatal error: Uncaught EngineException: Cannot use string offset as an array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug41919.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $foo[3]->bar[1] = "bang";
echo "ok\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Cannot use string offset as an object' in %sbug41919.php:%d
Fatal error: Uncaught EngineException: Cannot use string offset as an object in %sbug41919.php:%d
Stack trace:
#0 {main}
thrown in %sbug41919.php on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug42817.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $a = clone(null);
array_push($a->b, $c);
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug42817.php:2
Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42817.php:2
Stack trace:
#0 {main}
thrown in %sbug42817.php on line 2
2 changes: 1 addition & 1 deletion Zend/tests/bug42818.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bug #42818 ($foo = clone(array()); leaks memory)
$foo = clone(array());
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message '__clone method called on non-object' in %sbug42818.php:2
Fatal error: Uncaught EngineException: __clone method called on non-object in %sbug42818.php:2
Stack trace:
#0 {main}
thrown in %sbug42818.php on line 2
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug42819.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Array
[1] => 1
)

Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'foo\foo\unknown'' in %sbug42819.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d
Stack trace:
#0 %s(%d): foo\oops()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug42937.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test3
test4
test5

Fatal error: Uncaught exception 'EngineException' with message 'Call to undefined method C::test6()' in %sbug42937.php:21
Fatal error: Uncaught EngineException: Call to undefined method C::test6() in %sbug42937.php:21
Stack trace:
#0 %s(%d): B->test()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_10.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant)
echo namespace\bar."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_10.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_10.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_10.php on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_11.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function f($a=namespace\bar) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_11.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_11.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_12.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_12.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_12.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_13.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'bar'' in %sbug43344_13.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'bar' in %sbug43344_13.php:%d
Stack trace:
#0 %s(%d): f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Foo;
echo Foo::bar."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Class 'Foo\Foo' not found' in %sbug43344_2.php:%d
Fatal error: Uncaught EngineException: Class 'Foo\Foo' not found in %sbug43344_2.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_2.php on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_6.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Foo;
echo namespace\bar."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_6.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d
Stack trace:
#0 {main}
thrown in %sbug43344_6.php on line %d
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_7.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function f($a=namespace\bar) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_7.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_8.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_8.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug43344_9.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) {
echo f()."\n";
?>
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Undefined constant 'Foo\bar'' in %sbug43344_9.php:%d
Fatal error: Uncaught EngineException: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d
Stack trace:
#0 %s(%d): Foo\f()
#1 {main}
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/bug44141.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Y extends X
$y = Y::cheat(5);
echo $y->x, PHP_EOL;
--EXPECTF--
Fatal error: Uncaught exception 'EngineException' with message 'Call to private X::__construct() from context 'Y'' in %sbug44141.php:15
Fatal error: Uncaught EngineException: Call to private X::__construct() from context 'Y' in %sbug44141.php:15
Stack trace:
#0 %s(%d): Y::cheat(5)
#1 {main}
Expand Down
Loading

0 comments on commit 3ae995f

Please sign in to comment.