3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // AnyKeyArray - https://gist.github.com/vrana/5581788 $article_tags = array(); // Tohle šlo už dřív. $article_tags[array("article_id" => $article_id, "tag_id" => $tag_id)] = $article_tag; echo $article_tags[array("article_id" => $article_id, "tag_id" => $tag_id)]; // Tohle funguje až v PHP 5.5. foreach ($article_tags as $key => $val) { print_r($key); } ?>
based on jIPTV
Output for 7.1.0 - 7.2.0
Notice: Undefined variable: article_id in /in/WWZrU on line 6 Notice: Undefined variable: tag_id in /in/WWZrU on line 6 Warning: Illegal offset type in /in/WWZrU on line 6 Notice: Undefined variable: article_id in /in/WWZrU on line 7 Notice: Undefined variable: tag_id in /in/WWZrU on line 7 Warning: Illegal offset type in /in/WWZrU on line 7
Output for 5.3.19 - 7.0.20
Notice: Undefined variable: article_id in /in/WWZrU on line 6 Notice: Undefined variable: tag_id in /in/WWZrU on line 6 Warning: Illegal offset type in /in/WWZrU on line 6 Notice: Undefined variable: article_tag in /in/WWZrU on line 6 Notice: Undefined variable: article_id in /in/WWZrU on line 7 Notice: Undefined variable: tag_id in /in/WWZrU on line 7 Warning: Illegal offset type in /in/WWZrU on line 7