1--TEST-- 2Bug #46578 (strip_tags() does not honor end-of-comment when it encounters a single quote) 3--FILE-- 4<?php 5 6var_dump(strip_tags('<!-- testing I\'ve been to mars -->foobar')); 7 8var_dump(strip_tags('<a alt="foobar">foo<!-- foo! --></a>bar')); 9 10var_dump(strip_tags('<a alt="foobar"/>foo<?= foo! /* <!-- "cool" --> */ ?>bar')); 11 12var_dump(strip_tags('< ax')); 13 14var_dump(strip_tags('<! a>')); 15 16var_dump(strip_tags('<? ax')); 17 18?> 19--EXPECTF-- 20%string|unicode%(6) "foobar" 21%string|unicode%(6) "foobar" 22%string|unicode%(6) "foobar" 23%string|unicode%(4) "< ax" 24%string|unicode%(0) "" 25%string|unicode%(0) "" 26