Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created February 23, 2013 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/5020289 to your computer and use it in GitHub Desktop.
Save shigemk2/5020289 to your computer and use it in GitHub Desktop.
主にarrayの挙動を確認したい
<?php
$hoge = array(1, 2, 3);
var_dump(array_key_exists(array(), $hoge)); // PHP Warning: array_key_exists(): The first argument should be either a string or an integer bool(false)
var_dump(isset($hoge[array()])); // PHP Warning: Illegal offset type in isset or empty bool(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment