php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68160 Quoting Issue
Submitted: 2014-10-05 21:32 UTC Modified: 2014-10-05 22:01 UTC
From: willy at brimbox dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.4.33 OS: Centos
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: willy at brimbox dot com
New email:
PHP Version: OS:

 

 [2014-10-05 21:32 UTC] willy at brimbox dot com
Description:
------------
I have found that single quotes are behaving different than double quotes on escaped new lines. I have tested this in 5.4.32 and 5.4.18.  Forgive me if this has been fixed or reported, or is expected behavior, and for not testing it in 5.4.33.

Test script:
---------------
echo ord('\n');
echo " ";
echo ord("\n");


Expected result:
----------------
10 10

Actual result:
--------------
92 10

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-05 21:42 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 [2014-10-05 21:42 UTC] nikic@php.net
Single quoted strings aren't subject to variable and escape sequence parsing (\' and \\ notwithstanding). See Note on http://de1.php.net/manual/en/language.types.string.php#language.types.string.syntax.single.
 [2014-10-05 22:01 UTC] willy at brimbox dot com
Thanks, now I know, sorry to bother you.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 13:00:02 2026 UTC