|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-09-11 15:54 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 06:00:01 2025 UTC |
Description: ------------ $this can be changed when you use an automagic function. Reproduce code: --------------- <?php function change(&$var, $value) { $var = $value; return true; } class foo { function __construct() { change($this, false); var_dump($this); } } $foo = new foo; ?> Expected result: ---------------- HTTP/1.1 500 Internal Server Error Fatal error: Cannot re-assign $this in %s on line %d Actual result: -------------- HTTP/1.1 200 OK bool(false)