|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22096 return inside a while loop isn't breaking the loop and returning a value
Submitted: 2003-02-06 15:09 UTC Modified: 2003-02-20 08:08 UTC
Avg. Score:3.9 ± 1.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: enygma at phpdeveloper dot org Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4.2.2 OS: RedHat Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-02-06 15:09 UTC] enygma at phpdeveloper dot org
Here's the code I'm working with:

function getFilePath($filename,$path=''){
		if(empty($path)){ $path=$this->basedir; }
		echo $path."<br>";
							return $file_path;
		//return $this->found_path;

Where it starts in one dir, and goes until it finds a file - then, when it does, it's supposed to return that path value - but it doesn't. It keeps going through the rest of the directories without stopping at the "return"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-09 10:56 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2003-02-20 08:08 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

And the latest PHP version is 4.3.1 nowadays..

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 01:01:27 2023 UTC