3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $map = array('Yes' => true, 'No' => false); $input = array('va' => 'No', 'firsttime' => 'Yes', 'name' => 'foobar', 'price' => 123000); foreach ($input as $key => $value) { $input[$key] = array_key_exists($value, $map) ? $map[$value] : $value; } print_r($input);
based on uYoDN
Output for 4.3.0 - 7.2.0
Array ( [va] => [firsttime] => 1 [name] => foobar [price] => 123000 )