3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filter = array( "user_id" => array("filter" => FILTER_VALIDATE_INT), "iho_id" => array("filter" => FILTER_VALIDATE_INT), ); $arResult["user_id"] = 1234; $arResult = filter_var_array($arResult, $filter); var_dump($arResult);
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["user_id"]=> int(1234) ["iho_id"]=> NULL }
Output for 5.0.0 - 5.1.6
Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 3 Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 4 Fatal error: Call to undefined function filter_var_array() in /in/RRg6J on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 3 Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 4 Fatal error: Call to undefined function: filter_var_array() in /in/RRg6J on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 3 Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 4 Fatal error: Call to undefined function: filter_var_array() in /in/RRg6J on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 3 Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/RRg6J on line 4 Fatal error: Call to undefined function: filter_var_array() in /in/RRg6J on line 8