3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ( ! defined('PHP_EOL')) { define('PHP_EOL', "\n"); } $array = array('a' => false, 'b' => null, 'c' => '', 'd' => true); 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.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
"a" => "" isset = true ake = true "b" => "" isset = false ake = true "c" => "" isset = true ake = true "d" => "1" isset = true ake = true