php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #41700 documentation not clear about "whatever() or return;"
Submitted: 2007-06-15 12:37 UTC Modified: 2007-08-27 22:45 UTC
From: looris at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Irrilevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: looris at gmail dot com
New email:
PHP Version: OS:

 

 [2007-06-15 12:37 UTC] looris at gmail dot com
Description:
------------
I came across this: http://bugs.php.net/bug.php?id=40712

here's what iliaa wrote:

+++++

Thank you for taking the time to write to us, but this is not

a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at 
http://bugs.php.net/how-to-report.php

+++++

now, I guess that you can't do "..or return.." because return isn't a function, ok, but, reading the documentation, nothing related to this sort of thing is ever mentioned in these related articles:
http://www.php.net/manual/en/function.return.php
http://www.php.net/manual/en/functions.returning-values.php
http://www.php.net/manual/en/language.operators.logical.php
http://www.php.net/manual/en/language.functions.php

Maybe this thing is explained somewhere in the docs, but it seems a little awkward to me that it doesn't appear on none of these related articles. I think this kind of thing does really need to be mentioned somewhere in these places. If this is not a documentation bug, i don't know what is.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-15 12:58 UTC] smlerman at gmail dot com
From http://www.php.net/manual/en/function.return.php:
"...the return() statement..."

Return is a statement, not a function or expression. It has to appear on its own, not as part of some other statement.
 [2007-08-17 02:08 UTC] vrana@php.net
"return" is not a function as documented in "return" documentation.
 [2007-08-27 22:45 UTC] looris at gmail dot com
so what? read again what I wrote.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 02:01:32 2025 UTC