note 120836 added to function.strstr
| From: | Soaku | Date: | Sat, 18 Mar 2017 19:34:43 +0000 |
| Subject: | note 120836 added to function.strstr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-208909@lists.php.net to get a copy of this message | ||
I tried this function on PHP 5.6 and got very weird results.
This functions gets crazy, when you use php tags inside.
<?php
echo substr(stristr("<?php Foo ?> Foo <?php BLAH ?> bar", "?>"),
2);
// returns "Foo bar"
?>
This function removes every php tag inside.
The second weird thing, is that it happens after the process is done:
<?php
echo substr(stristr("<?php Foo </html> ?> Foo <?php BLAH ?> bar",
"</html>"), 7);
// returns " ?> Foo bar"
?>
----
Server IP: 72.52.91.14
Probable Submitter: 91.231.24.149
----
Manual Page -- http://php.net/manual/en/function.strstr.php
Edit -- https://master.php.net/note/edit/120836
Del: integrated -- https://master.php.net/note/delete/120836/integrated
Del: useless -- https://master.php.net/note/delete/120836/useless
Del: bad code -- https://master.php.net/note/delete/120836/bad+code
Del: spam -- https://master.php.net/note/delete/120836/spam
Del: non-english -- https://master.php.net/note/delete/120836/non-english
Del: in docs -- https://master.php.net/note/delete/120836/in+docs
Del: other reasons-- https://master.php.net/note/delete/120836
Reject -- https://master.php.net/note/reject/120836
Search -- https://master.php.net/manage/user-notes.php