3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $varToFilter = 2555; $test = ''; if (is_string($varToFilter)) { $test = filter_var($varToFilter, FILTER_SANITIZE_STRING); } var_dump($test);
based on 7P6nM
Output for 4.3.0 - 7.2.0
string(0) ""