3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = ['true', true, 'false', false, 1, '1', 0, '0', new stdClass()]; var_dump(filter_var($data, FILTER_VALIDATE_BOOLEAN, FILTER_REQUIRE_ARRAY));
based on 3qL2E
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
array(9) { [0]=> bool(true) [1]=> bool(true) [2]=> bool(false) [3]=> bool(false) [4]=> bool(true) [5]=> bool(true) [6]=> bool(false) [7]=> bool(false) [8]=> bool(false) }
Output for hhvm-3.15.4
bool(false)