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: 2018-08-14 15:33 UTC
Votes:4
Avg. Score:3.8 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (25.0%)
From: sebastian_rose at gmx dot de Assigned:
Status: Suspended Package: Scripting Engine problem
PHP Version: 5.2.6 OS: Debian testing
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sebastian_rose at gmx dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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
 [2018-08-14 15:33 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2018-08-14 15:33 UTC] cmb@php.net
Are you still interested in this “feature”?  It seems to me that
FF have been not uncommon years ago, but are somehow a relict of
the past, so this should be discussed on the internals@ mailing
list.  For the time being, I'm suspending this ticket.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 01 01:01:28 2024 UTC