Doc #62222 [Com]: Continue 0; is invalid

From: Date: Mon, 04 Jun 2012 09:52:13 +0000
Subject: Doc #62222 [Com]: Continue 0; is invalid
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8419@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62222&edit=1 ID: 62222 Comment by: shiranai7 at hotmail dot com Reported by: maik at phpkuh dot de Summary: Continue 0; is invalid Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Ubuntu 12.04 PHP Version: 5.4.3 Block user comment: N Private report: N New Comment: I can confirm this. The doc translations also contain the information about continue 0; behaving the same way as continue; This information should be enhanced by adding that this is true only until 5.4. Since then the optional numeric argument must be greater than or equal to 1. Previous Comments: ------------------------------------------------------------------------ [2012-06-04 09:14:06] maik at phpkuh dot de Description: ------------ --- From manual page: http://www.php.net/control-structures.continue --- Using continue 0; will fail under PHP 5.4: Same is true for break 0; but documentation is wrong only for continue and incomplete for http://php.net/manual/en/migration54.incompatible.php (not sure, but can't see other statements affected). Did not check translations. Test script: --------------- <?php do { continue 0; } while(false); echo 'passed'; Expected result: ---------------- passed Actual result: -------------- PHP Fatal error: 'continue' operator accepts only positive numbers ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62222&edit=1

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