3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $accessible = array('title', 'description', 'category_ids'); $attributes = array('id', 'title', 'description', 'permalink', 'author_id', 'category_ids', 'pippo'); print_r(array_intersect($accesible, $attributes)); print_r(array_intersect($attributes, $accesible));
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: accesible in /in/nfRBp on line 5 Warning: array_intersect(): Argument #1 is not an array in /in/nfRBp on line 5 Notice: Undefined variable: accesible in /in/nfRBp on line 6 Warning: array_intersect(): Argument #2 is not an array in /in/nfRBp on line 6
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: accesible in /in/nfRBp on line 5 Warning: array_intersect(): Argument #1 is not an array in /in/nfRBp on line 5 Notice: Undefined variable: accesible in /in/nfRBp on line 6 Warning: array_intersect(): Argument #2 is not an array in /in/nfRBp on line 6
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: accesible in /in/nfRBp on line 5 Warning: array_intersect() [http://www.php.net/function.array-intersect]: Argument #1 is not an array in /in/nfRBp on line 5 Notice: Undefined variable: accesible in /in/nfRBp on line 6 Warning: array_intersect() [http://www.php.net/function.array-intersect]: Argument #2 is not an array in /in/nfRBp on line 6