3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(FILTER_FLAG_NO_ENCODE_QUOTES, FILTER_FLAG_STRIP_LOW, FILTER_FLAG_STRIP_HIGH, FILTER_FLAG_ENCODE_LOW, FILTER_FLAG_ENCODE_HIGH, FILTER_FLAG_ENCODE_AMP); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH)); var_dump(filter_var('\\%éde_DE;ö#!&\n<tag>"\'', FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP));
Output for 5.2.1 - 7.1.0
int(128) int(4) int(8) int(16) int(32) int(64) string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(19) "\%éde_DE;ö#!&\n"'" string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(23) "\%de_DE;#!&\n&#34;&#39;" string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(47) "\%&#195;&#169;de_DE;&#195;&#182;#!&\n&#34;&#39;" string(31) "\%éde_DE;ö#!&#38;\n&#34;&#39;"
Output for 5.2.0
int(128) int(4) int(8) int(16) int(32) int(64) string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(19) "\%éde_DE;ö#!&\n"'" string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(23) "\%de_DE;#!&\n&#34;&#39;" string(27) "\%éde_DE;ö#!&\n&#34;&#39;" string(47) "\%&#195;&#169;de_DE;&#195;&#182;#!&\n&#34;&#39;" string(39) "\%éde_DE;ö#!&#38;\n&#38;#34;&#38;#39;"
Output for 5.0.0 - 5.1.6
Notice: Use of undefined constant FILTER_FLAG_NO_ENCODE_QUOTES - assumed 'FILTER_FLAG_NO_ENCODE_QUOTES' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/Zf3D7 on line 3 string(28) "FILTER_FLAG_NO_ENCODE_QUOTES" string(21) "FILTER_FLAG_STRIP_LOW" string(22) "FILTER_FLAG_STRIP_HIGH" string(22) "FILTER_FLAG_ENCODE_LOW" string(23) "FILTER_FLAG_ENCODE_HIGH" string(22) "FILTER_FLAG_ENCODE_AMP" Fatal error: Call to undefined function filter_var() in /in/Zf3D7 on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Use of undefined constant FILTER_FLAG_NO_ENCODE_QUOTES - assumed 'FILTER_FLAG_NO_ENCODE_QUOTES' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/Zf3D7 on line 3 string(28) "FILTER_FLAG_NO_ENCODE_QUOTES" string(21) "FILTER_FLAG_STRIP_LOW" string(22) "FILTER_FLAG_STRIP_HIGH" string(22) "FILTER_FLAG_ENCODE_LOW" string(23) "FILTER_FLAG_ENCODE_HIGH" string(22) "FILTER_FLAG_ENCODE_AMP" Fatal error: Call to undefined function: filter_var() in /in/Zf3D7 on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Use of undefined constant FILTER_FLAG_NO_ENCODE_QUOTES - assumed 'FILTER_FLAG_NO_ENCODE_QUOTES' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/Zf3D7 on line 3 string(28) "FILTER_FLAG_NO_ENCODE_QUOTES" string(21) "FILTER_FLAG_STRIP_LOW" string(22) "FILTER_FLAG_STRIP_HIGH" string(22) "FILTER_FLAG_ENCODE_LOW" string(23) "FILTER_FLAG_ENCODE_HIGH" string(22) "FILTER_FLAG_ENCODE_AMP" Fatal error: Call to undefined function: filter_var() in /in/Zf3D7 on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant FILTER_FLAG_NO_ENCODE_QUOTES - assumed 'FILTER_FLAG_NO_ENCODE_QUOTES' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/Zf3D7 on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/Zf3D7 on line 3 string(28) "FILTER_FLAG_NO_ENCODE_QUOTES" string(21) "FILTER_FLAG_STRIP_LOW" string(22) "FILTER_FLAG_STRIP_HIGH" string(22) "FILTER_FLAG_ENCODE_LOW" string(23) "FILTER_FLAG_ENCODE_HIGH" string(22) "FILTER_FLAG_ENCODE_AMP" Fatal error: Call to undefined function: filter_var() in /in/Zf3D7 on line 4