Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ext/standard/tests/filters/strip_tags.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--TEST--
strip_tags filter - ctor and dtor
--CREDIT--
H Hatfield hatfieldje@gmail.com UPHPU Test Fest
--FILE--
<?php
# vim600:syn=php:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# vim600:syn=php:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is the only change needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copy/paste from whichever test I used as a template. It seems to show up in quite a few files. I have no strong ties to this line, but would like to understand why it should be removed.

Copy link
Contributor

@petk petk Feb 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hhatfield These are so called Vim modes. They are now gone from the php-src in favour of the EditorConfig and manual user side configurations. See this change:
php/php-src@92ac598

and here https://externals.io/message/101206

Yes, they were present once in some of those files. Some are still there but only on very rare places (for eample *.w32 files to enable syntax highlighting and for some documentation purposes). Long term: they should all be replaced with different approaches. For example, EditorConfig once more options will be available.


$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'string.strip_tags', STREAM_FILTER_WRITE, "<b><i><u>");
fwrite($fp, "<b>bolded text</b> enlarged to a <h1>level 1 heading</h1>\n");
fclose($fp);
?>
--EXPECTF--
<b>bolded text</b> enlarged to a level 1 heading