Doc #69308 [Asn->Csd]: return description misleading

From: Date: Fri, 18 Dec 2015 21:32:16 +0000
Subject: Doc #69308 [Asn->Csd]: return description misleading
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12983@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69308&edit=1 ID: 69308 Updated by: tpunt@php.net Reported by: cmb@php.net Summary: return description misleading -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: * PHP Version: Irrelevant Assigned To: tpunt Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2015-12-18 21:32:06] tpunt@php.net I've resolved this by changing "statement" to "expression", since control of execution will always be passed back into an expression context: "Execution resumes at the expression following the called module's invocation." Commit: https://svn.php.net/viewvc?view=revision&revision=338310 ------------------------------------------------------------------------ [2015-12-18 21:31:20] tpunt@php.net Automatic comment from SVN on behalf of tpunt Revision: http://svn.php.net/viewvc/?view=revision&revision=338310 Log: Resolve doc bug #69308 ------------------------------------------------------------------------ [2015-03-26 14:06:59] cmb@php.net Description: ------------ --- From manual page: http://www.php.net/function.return --- The following description is misleading: | return returns program control to the calling module. Execution | resumes at the statement following the called module's invocation. Consider a compound expression, where return will not cause execution to resume with the next *statement*, but rather with the next (not necessarily lexically, but rather in order of evaluation precedence) *expression*: echo my_trim('hello') . my_trim('world'); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69308&edit=1

« previous php.doc.bugs (#12983) next »