ID: 45972 Updated by: [EMAIL PROTECTED] Reported By: woeterman at gmail dot com -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Linux Debian PHP Version: 5.2.6 New Comment:
That's because normal string escape rules still apply, and \t is the tab character. Previous Comments: ------------------------------------------------------------------------ [2008-09-02 11:37:42] woeterman at gmail dot com Description: ------------ When escaping with date("\t"), it shows up as nothing instead of 't'. It seems to work fine with other characters, such as \a Reproduce code: --------------- <?php echo "1: ". date("jS \of F Y H:i:s"). "<br />"; echo "2: ". date("jS \of F Y at H:i:s"). "<br />"; echo "3: ". date("jS \of F Y \at H:i:s"). "<br />"; echo "4: ". date("jS \of F Y \a\t H:i:s"). "<br />"; echo "5: ". date("jS \of F Y \t H:i:s"). "<br />"; ?> Expected result: ---------------- 1: 2nd of September 2008 13:36:57 2: 2nd of September 2008 pm30 13:36:57 3: 2nd of September 2008 a30 13:36:57 4: 2nd of September 2008 at 13:36:57 5: 2nd of September 2008 t 13:36:57 Actual result: -------------- 1: 2nd of September 2008 13:36:57 2: 2nd of September 2008 pm30 13:36:57 3: 2nd of September 2008 a30 13:36:57 4: 2nd of September 2008 a 13:36:57 5: 2nd of September 2008 13:36:57 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45972&edit=1