3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $options = array(true, 'foo', 100, false); foreach ($options as $optionKey => $optionValue) { if (true === $optionValue) { $options[$optionKey] = "true"; } else if (false === $optionValue) { $options[$optionKey] = "false"; } } var_dump($options);
Output for 4.3.0 - 7.2.0
array(4) { [0]=> string(4) "true" [1]=> string(3) "foo" [2]=> int(100) [3]=> string(5) "false" }