3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php key($undefined);
Output for 7.0.0 - 7.3.0rc3
Notice: Undefined variable: undefined in /in/g8puZ on line 2 Warning: key() expects parameter 1 to be array, null given in /in/g8puZ on line 2
Output for hhvm-3.10.1 - 3.17.3
Warning: Invalid operand type was used: expecting an array in /in/g8puZ on line 2
Output for 5.3.0 - 5.6.30
Warning: key() expects parameter 1 to be array, null given in /in/g8puZ on line 2
Output for 4.3.2 - 4.4.0, 4.4.2 - 5.2.17
Warning: key(): Passed variable is not an array or object in /in/g8puZ on line 2
Output for 4.4.1
Notice: Undefined variable: undefined in /in/g8puZ on line 2 Warning: key(): Passed variable is not an array or object in /in/g8puZ on line 2
Output for 4.3.0 - 4.3.1
Warning: key() [http://www.php.net/function.key]: Passed variable is not an array or object in /in/g8puZ on line 2