php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #46012 formfeeds are not considered whitespace
Submitted: 2008-09-06 18:18 UTC Modified: 2016-12-31 00:29 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sebastian_rose at gmx dot de Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: 5.2.6 OS: Debian testing
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-09-06 18:18 UTC] sebastian_rose at gmx dot de
Description:
------------
Formfeeds in PHP scripts trigger a warning, i.e. are NOT considered whitespace a usual.

Reproduce code:
---------------
<?php
  /* == Add a formfeed for pageing big files in emacs == */

\f
// replace \f with a form feed to test.

?>

Expected result:
----------------
I expect to see nothing.

All libraries and compilers consider formfeeds a whitespace. I thought about sending this as a bug report at first, but think it's enough to have it here again (after http://bugs.php.net/bug.php?id=30125 - the same but for Php 4.3.8, September 2004!!!).

I'd volunteer to change this if I someone points me to where to start.

Actual result:
--------------
<br />
<b>Warning</b>:  Unexpected character in input:  '' (ASCII=12) state=1 in <b>/path/to/test.php</b> on line <b>4</b><br />


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-06 19:19 UTC] sebastian_rose at gmx dot de
It seems the error is in Zend/zend_language_scanner.l ???
As the grammar is defined in there? I never used yacc or bison ...


./Zend/zend_language_scanner.l, line 901 and 902:


WHITESPACE [ \n\r\t\f]+
TABS_AND_SPACES [ \t\f]*

should be

WHITESPACE [ \n\r\t\f]+
TABS_AND_SPACES [ \t\f]*

???
 [2016-12-31 00:29 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Scripting Engine problem
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC