3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $movies = array ( "horror"=>array ( "Paranormal Activity"=> array ( "Katie Featherston", "Kathryn Newton" ), "The Ring"=> array ( "Naomi Watts", "Brian Cox" ), "Sleepy Hollow"=> array( "Johhny Depp", "Christina Ricci" ) ), "action" => array ( "The Tourist"=> array ( "Johnny Depp", "Angelina Jolie" ), "Public Enemies"=> array ( "Johnny Depp", "Christian Bale" ), "The Dark Knight Rises"=> array ( "Christian Bale", "Tom Hardy" ), "Salt"=> array ( "Angelina Jolie" ) ), "thriller"=> array ( "Inception"=> array( "Leornardio Dicaprio", "Tom Hardy" ), "Changeling" => array( "Angelina Jolie" ), "The Game"=> array( "Michael Douglas", "Sean Penn" ) ) ); $keys = array_keys($movies); foreach ($keys as $genre) { echo $genre,"\n"; }
based on O0EWA
Output for 4.3.0 - 7.1.0
horror action thriller