|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-31 00:51 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 27 20:00:02 2025 UTC |
Description: ------------ I expect that print "\a"; will fail because there is no entity like \a among \n, \r, \t, \\, \$, \", \[0-7]{1,3} and \x[0-9A-Fa-f]{1,2}. It is like that browsers like IE shows "&abc" as there were written "&abc". It's harmful. More than that, I and some other PHP experts have been puzzleing why this string works: $tokens = preg_split('/(?<!\\\)[&?!]/', $query, -1, PREG_SPLIT_DELIM_CAPTURE); Everybody expected that ) was escaped! Reproduce code: --------------- $tokens = preg_split('/(?<!\\\)[&?!]/', $query, -1, PREG_SPLIT_DELIM_CAPTURE); Expected result: ---------------- PHP fails because of brackets mismatch (one of brackets is escaped). Actual result: -------------- It works :(