Bug->Req #68777 [Opn]: \a escape not supported for double-quoted strings and heredocs
Edit report at https://bugs.php.net/bug.php?id=68777&edit=1
ID: 68777
Updated by: cmb@php.net
Reported by: ajf at ajf dot me
Summary: \a escape not supported for double-quoted strings
and heredocs
Status: Open
-Type: Bug
+Type: Feature/Change Request
Package: Strings related
Operating System: *
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
That doesn't look like a bug to me, but rather a feature request.
Previous Comments:
------------------------------------------------------------------------
[2015-01-09 18:16:13] 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.
------------------------------------------------------------------------
[2015-01-09 11:50:40] 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 10:27:51] ajf at ajf dot me
Description:
------------
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:
---------------
<?php
echo "\a";
Expected result:
----------------
<terminal beeps/flashes/some other "alert" if supported>
Actual result:
--------------
\a
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68777&edit=1
Thread (5 messages)