3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $info = array('coffee', 'brown', 'caffeine'); // Listing all the variables list($drink, $color, $power) = $info; echo "$drink is $color and $power makes it special.\n"; // Listing some of them list($drink, , $power) = $info; echo "$drink has $power.\n"; // Or let's skip to only the third one list( , , $power) = $info; echo "I need $power!\n"; // list() doesn't work with strings list($bar) = "abcde"; var_dump($bar); // NULL
Output for 4.3.0 - 5.0.5, 5.2.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
coffee is brown and caffeine makes it special. coffee has caffeine. I need caffeine! NULL
Output for 5.1.1 - 5.2.1
coffee is brown and caffeine makes it special. coffee has caffeine. I need caffeine! Fatal error: Invalid opcode 98/1/1. in /in/hScDq on line 17
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/hScDq on line 18
Process exited with code 255.