3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('a' => false, 'b' => null, 'c' => '', 'd' => 'd'); function asBool($value) { return $value ? 'true' : 'false' ; } foreach ($array as $k => $v) { printf( '%s => %s isset = %s ake = %s' . PHP_EOL, $k, $v, asBool(isset($array[ $k ])), asBool(array_key_exists($k, $array)) ); }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
a => isset = true ake = true b => isset = false ake = true c => isset = true ake = true d => d isset = true ake = true
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/YIkcr on line 10 a => isset = true ake = truePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/YIkcr on line 10 b => isset = false ake = truePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/YIkcr on line 10 c => isset = true ake = truePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/YIkcr on line 10 d => d isset = true ake = truePHP_EOL