php-src/Zend/tests/bug41117_1.phpt
Nikita Popov 77bb96d7c9 Fix bug #71737
Also improve the error message for $this used in parameters.
2016-04-20 18:38:40 +02:00

14 lines
242 B
PHP

--TEST--
Bug #41117 (Altering $this via argument)
--FILE--
<?php
class foo {
function __construct($this) {
echo $this."\n";
}
}
$obj = new foo("Hello world");
?>
--EXPECTF--
Fatal error: Cannot use $this as parameter in %s on line %d