3v4l.org

run code in 500+ PHP versions simultaneously
<?php // An indexed array of programming languages $languages = ['PHP', 'JavaScript', 'Python', 'Go']; // Accessing elements by their index echo "The second language is: " . $languages[1] . PHP_EOL; // Index 1 is the second element // To see the whole array structure, use print_r() or var_dump() print_r($languages);
Output for master
The second language is: JavaScript Array ( [0] => PHP [1] => JavaScript [2] => Python [3] => Go )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
17.82 ms | 1164 KiB | 7 Q