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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rick at dualmedia dot it
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 05:01:30 2024 UTC