php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38787 Wrong line number in switch statement
Submitted: 2006-09-12 09:49 UTC Modified: 2006-09-20 01:00 UTC
From: rick at dualmedia dot it Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.4.4 OS: Linux ubuntu
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-09-12 09:49 UTC] rick at dualmedia dot it
Description:
------------
With the example code the line number is wrong and the parse skip line codes;

Reproduce code:
---------------
<?php
$a = 3;

switch ($a) {
	case 1:
		echo 1;
		$p = <<<EOF
text
text
EOF;
		break;

	case 2:
		echo 1;
		$p = <<<EOF
text
text
EOF;
		break;
		
	case 3:
		print __LINE__;
		break;

	default:
		break;
}
?>

Expected result:
----------------
22

Actual result:
--------------
24

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-12 10:08 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Works perfectly fine with 4.4, 5.1 and 5.2 here.
 [2006-09-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 10:01:30 2024 UTC