Source Code:
(back to article)
<?php /** * @var array[int] $numbers An array of integers. */ $numbers = [1, 2, 3, 4, 5]; /** * Function to output the contents of the $numbers array. */ function outputNumbers() { global $numbers; foreach ($numbers as $number) { echo $number . "\n"; } } outputNumbers(); ?>
Result:
Report an issue