1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/standard/tests/array/next_basic.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

34 lines
744 B
PHP

--TEST--
Test next() function : basic functionality
--FILE--
<?php
/* Prototype : mixed next(array $array_arg)
* Description: Move array argument's internal pointer to the next element and return it
* Source code: ext/standard/array.c
*/
/*
* Test basic functionality of next()
*/
echo "*** Testing next() : basic functionality ***\n";
$array = array('zero', 'one', 'two');
echo key($array) . " => " . current($array) . "\n";
var_dump(next($array));
echo key($array) . " => " . current($array) . "\n";
var_dump(next($array));
echo key($array) . " => " . current($array) . "\n";
var_dump(next($array));
?>
--EXPECT--
*** Testing next() : basic functionality ***
0 => zero
string(3) "one"
1 => one
string(3) "two"
2 => two
bool(false)