3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function lambda_filter_empty($entry) { return ($entry !== ''); } $test = array( 'country_id' => '1', 'state' => '', 'city' => '', 'address1' => '', ); $result = array_keys(array_filter($test, "lambda_filter_empty")); var_dump($result); $bool = $result === array("country_id"); var_dump($bool);
based on 92t3o
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(1) { [0]=> string(10) "country_id" } bool(true)