Annotation of embedaddon/php/ext/standard/tests/array/array_values_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test array_values() function : basic functionality
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : array array_values(array $input)
! 6: * Description: Return just the values from the input array
! 7: * Source code: ext/standard/array.c
! 8: */
! 9:
! 10: /*
! 11: * Test basic functionality of array_values()
! 12: */
! 13:
! 14: echo "*** Testing array_values() : basic functionality ***\n";
! 15:
! 16:
! 17: // Initialise all required variables
! 18: $input = array('zero', 'one', 'two', 'three' => 3, 10 => 'ten');
! 19:
! 20: // Calling array_values() with all possible arguments
! 21: var_dump( array_values($input) );
! 22:
! 23: echo "Done";
! 24: ?>
! 25:
! 26: --EXPECTF--
! 27: *** Testing array_values() : basic functionality ***
! 28: array(5) {
! 29: [0]=>
! 30: string(4) "zero"
! 31: [1]=>
! 32: string(3) "one"
! 33: [2]=>
! 34: string(3) "two"
! 35: [3]=>
! 36: int(3)
! 37: [4]=>
! 38: string(3) "ten"
! 39: }
! 40: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>