php-src/ext/standard/tests/array/next_basic.phpt
Steph Fox 833f4150a1 - killed off UEXPECT
- could someone please fix var_export2.phpt? NUL is corrupted, can't fix here
2008-05-26 23:36:10 +00:00

36 lines
770 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));
?>
===DONE===
--EXPECT--
*** Testing next() : basic functionality ***
0 => zero
unicode(3) "one"
1 => one
unicode(3) "two"
2 => two
bool(false)
===DONE===