3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = 'test'; $nstring = filter_var($string, FILTER_SANATIZE_STRING); echo $nstring;
based on Ig1fJ
Output for 7.2.0
Warning: Use of undefined constant FILTER_SANATIZE_STRING - assumed 'FILTER_SANATIZE_STRING' (this will throw an Error in a future version of PHP) in /in/sK4Ip on line 3 Warning: filter_var() expects parameter 2 to be integer, string given in /in/sK4Ip on line 3
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant FILTER_SANATIZE_STRING - assumed 'FILTER_SANATIZE_STRING' in /in/sK4Ip on line 3 Warning: filter_var() expects parameter 2 to be integer, string given in /in/sK4Ip on line 3
Output for 5.3.19 - 5.6.28
Notice: Use of undefined constant FILTER_SANATIZE_STRING - assumed 'FILTER_SANATIZE_STRING' in /in/sK4Ip on line 3 Warning: filter_var() expects parameter 2 to be long, string given in /in/sK4Ip on line 3