|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68777 \a escape not supported for double-quoted strings and heredocs
Submitted: 2015-01-09 10:27 UTC Modified: 2021-09-09 12:43 UTC
Avg. Score:3.0 ± 2.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: ajf at ajf dot me Assigned:
Status: Open Package: Strings related
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
28 - 14 = ?
Subscribe to this entry?

 [2015-01-09 10:27 UTC] ajf at ajf dot me
Despite the support for the completely useless \v (vertical tab), \a, which produces the familiar terminal beep or flash that we all know and love, is conspicuously absent from PHP.

Test script:
echo "\a";

Expected result:
<terminal beeps/flashes/some other "alert" if supported>

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-01-09 11:50 UTC] anon at anon dot anon
Adding that would break backwards compatibility, so they will probably not do it without overwhelming reason to, but you can always use "\7" instead.
 [2015-01-09 18:16 UTC] ajf at ajf dot me
It would, but we have previously added \e, \v, \f, the first one in 5.4. I think it's an acceptable break for a minor or major.
 [2021-09-09 12:43 UTC]
-Type: Bug +Type: Feature/Change Request
 [2021-09-09 12:43 UTC]
That doesn't look like a bug to me, but rather a feature request.
 [2021-10-15 18:17 UTC] anthon dot pang at gmail dot com
The "\b" (backspace) isn't supported in double-quoted strings either. (That said, the sequence is supported in json_decode() per the spec,
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 02:01:29 2024 UTC