import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-array / array_values_variation6.php
blob8e21799a7751561719395e52a5eb3e5ad40c939e
1 <?php
2 /* Prototype : array array_values(array $input)
3 * Description: Return just the values from the input array
4 * Source code: ext/standard/array.c
5 */
7 /*
8 * Test array_values() when:
9 * 1. Passed an array made up of referenced variables
10 * 2. Passed an array by reference
13 echo "*** Testing array_values() : usage variations ***\n";
15 $val1 = 'one';
16 $val2 = 'two';
17 $val3 = 'three';
19 echo "\n-- \$input is an array made up of referenced variables: --\n";
20 $input = array(&$val1, &$val2, &$val3);
21 var_dump($result1 = array_values($input));
23 echo "Change \$val2 and check result of array_values():\n";
24 $val2 = 'deux';
25 var_dump($result1);
27 echo "Done";