3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filter = array( "user_id" => array("filter" => FILTER_VALIDATE_INT), ); $arResult["user_id"] = 1234; $arResult = filter_var_array($arResult, $filter); var_dump($arResult);
Output for 5.2.0 - 7.1.0
array(1) { ["user_id"]=> int(1234) }
Output for 5.0.0 - 5.1.6
Notice: Use of undefined constant FILTER_VALIDATE_INT - assumed 'FILTER_VALIDATE_INT' in /in/vBRlQ on line 3 Fatal error: Call to undefined function filter_var_array() in /in/vBRlQ on line 7
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/vBRlQ on line 3 Fatal error: Call to undefined function: filter_var_array() in /in/vBRlQ on line 7
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/vBRlQ on line 3 Fatal error: Call to undefined function: filter_var_array() in /in/vBRlQ on line 7
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/vBRlQ on line 3 Fatal error: Call to undefined function: filter_var_array() in /in/vBRlQ on line 7