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', FILTER_SANITIZE_STRING));
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
int(128) int(4) int(8) int(16) int(32) int(64) string(16) "\%éde_DE;ö#!\n"
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/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/SGseZ 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/SGseZ 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/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/SGseZ 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/SGseZ 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/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/SGseZ 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/SGseZ 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/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_LOW - assumed 'FILTER_FLAG_STRIP_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_STRIP_HIGH - assumed 'FILTER_FLAG_STRIP_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_LOW - assumed 'FILTER_FLAG_ENCODE_LOW' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_HIGH - assumed 'FILTER_FLAG_ENCODE_HIGH' in /in/SGseZ on line 3 Notice: Use of undefined constant FILTER_FLAG_ENCODE_AMP - assumed 'FILTER_FLAG_ENCODE_AMP' in /in/SGseZ 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/SGseZ on line 4