ID:               20842
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dparks at verinform dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Any
 PHP Version:      4.2.3
 Assigned To:      jmcastagnetto
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2002-12-10 14:51:56] [EMAIL PROTECTED]

Assigning this bug to myself so I won't forget to add examples to the
docs.

------------------------------------------------------------------------

[2002-12-08 18:32:44] dparks at verinform dot com

http://www.php.net/manual/en/language.constants.php says a notice
should be generated. I did not get a notice. Maybe we have notice-level
messages turned of on php.ini or something like that? I'll check this
again when I get to work tomorrow.

------------------------------------------------------------------------

[2002-12-08 06:02:31] m dot ford at lmu dot ac dot uk

Re:

> Argh!! Apparently, PHP evaluates
> 
> $this->val = val;
> 
> without error, treating val like 'val'. I can't find this documented
in
> the manual.

The following appears in the manual page for Constants
(http://www.php.net/manual/en/language.constants.php):

http://uk.php.net/manual/en/language.constants.php

> If you use an undefined constant, PHP assumes that you
> mean the name of the constant itself. A notice will be
> issued when this happens.

Admittedly this is not very obvious, but it is there.  Perhaps an
additional note somewhere in the section on strings would be
appropriate, as this seems to be a fairly common error (particularly in
array subscripts!).

Cheeers!

------------------------------------------------------------------------

[2002-12-07 06:40:43] [EMAIL PROTECTED]

Jesus, it would be nice to have your examples in the documentation. I
cannot add it right now, unfortunately.

------------------------------------------------------------------------

[2002-12-05 19:53:03] dparks at verinform dot com

Argh!! Apparently, PHP evaluates

$this->val = val;

without error, treating val like 'val'. I can't find this documented in
the manual.

The code posted near the end of the bug at
http://bugs.php.net/bug.php?id=20681 (look for [28 Nov 2:02pm]
[EMAIL PROTECTED]) contains an error like this, which was not noticed
by 4 people. Because of this, the code returns true for all
comparisons.

The behavior you describe is what I expected. Sorry about the mixup.

It would still be nice to have an explanation about how copies
(assignment) are done on objects -- is this a deep value copy? How are
references handled?

Also, it would be nice if the comparison operator page explained how
recursion is handled.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/20842

-- 
Edit this bug report at http://bugs.php.net/?id=20842&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to