Home
last modified time | relevance | path

Searched refs:arr (Results 1 – 25 of 280) sorted by relevance

12345678910>>...12

/php-src/Zend/tests/list/
H A Dlist_keyed_evaluation_order_2.phpt20 $arr = [];
21 list($arr[], $arr[]) = ['a', 'b'];
22 var_dump($arr[0]);
23 var_dump($arr[1]);
25 $arr = [];
26 list(0 => $arr[], 1 => $arr[]) = ['a', 'b'];
30 $arr = [];
31 list(1 => $arr[], 0 => $arr[]) = ['b', 'a'];
35 $arr = [];
36 list(list(1 => $arr[], 0 => $arr[])) = [['b', 'a']];
[all …]
H A Dlist_reference_001.phpt5 $arr = array(1, array(2));
6 list(&$a, list(&$b)) = $arr;
8 var_dump($arr);
10 $arr = array(1, array(2));
11 list($a, &$b) = $arr;
12 var_dump($arr);
14 $arr = array(1, array(2));
15 [&$a, [&$b]] = $arr;
17 var_dump($arr);
22 var_dump($arr);
[all …]
H A Dlist_reference_008.phpt7 $arr = [&$a, &$b];
8 list(&$a, &$b) = $arr;
9 var_dump($a, $b, $arr);
11 var_dump($a, $b, $arr);
12 unset($a, $b, $arr);
17 * $arr would look like, [2,2]
20 $arr = [1, 2];
21 list(&$a, $a) = $arr;
24 var_dump($arr);
25 unset($a, $arr);
/php-src/ext/standard/tests/array/
H A Dbug70668.phpt7 $s = &$arr[0];
8 var_dump(array_keys($arr, $s, true));
10 $s = &$arr[1];
11 var_dump(array_keys($arr, $s, true));
13 $s = &$arr[2];
14 var_dump(array_keys($arr, $s, true));
16 $s = &$arr[3];
19 $s = &$arr[4];
22 $s = &$arr[5];
25 $s = &$arr[6];
[all …]
H A Darray_map_variation2.phpt7 $arr = array("k1" => "v1","k2"=>"v2");
8 $arr[]=&$arr["k1"];
9 $arr[]=&$arr;
11 var_dump( array_map("cb1", $arr));
12 var_dump( array_map(null, $arr));
13 var_dump( array_map(null, $arr, $arr));
16 $arr[0] = null;
17 $arr[1] = null;
H A Darray_map_variation1.phpt8 $arr = array("stringkey" => "value");
11 var_dump( array_map("cb1", $arr));
12 var_dump( array_map("cb2", $arr,$arr));
13 var_dump( array_map(null, $arr));
14 var_dump( array_map(null, $arr, $arr));
/php-src/ext/standard/tests/general_functions/
H A Darray_is_list.phpt35 $arr = [1, 2, 3];
36 unset($arr[0]);
39 $arr = [1, 2, 3];
40 unset($arr[1]);
43 $arr = [1, 2, 3];
44 unset($arr[2]);
48 unset($arr["a"]);
52 unset($arr[1]);
60 $arr[] = 4;
64 $arr[3] = 4;
[all …]
/php-src/Zend/tests/
H A D029.phpt6 $arr = array(new stdClass);
8 $arr[0]->a = clone $arr[0];
9 var_dump($arr);
11 $arr[0]->b = new $arr[0];
12 var_dump($arr);
14 $arr[0]->c = $arr[0]->a;
15 var_dump($arr);
H A Dbug50255.phpt6 $arr = array('foo' => 'bar');
9 var_dump(isset($arr->foo));
10 var_dump(isset($arr->bar));
11 var_dump(isset($arr['foo']));
12 var_dump(isset($arr['bar']));
14 var_dump(empty($arr->foo));
15 var_dump(empty($arr->bar));
16 var_dump(empty($arr['foo']));
17 var_dump(empty($arr['bar']));
H A Dbug72543_1.phpt5 $arr = [];
6 $arr[0] = null;
7 $ref =& $arr[0];
9 $arr[0][0] = $arr[0];
10 var_dump($arr);
H A Dbug72543_2.phpt5 $arr = [];
6 $arr[0] = null;
7 $ref =& $arr[0];
9 $arr[0][$arr[0]] = null;
10 var_dump($arr);
H A Dbug60362.phpt5 $arr = array('exists' => 'foz');
7 if (isset($arr['exists']['non_existent'])) {
9 var_dump($arr['exists']['non_existent']);
13 if (isset($arr['exists'][1])) {
15 var_dump($arr['exists'][1]);
27 if (isset($arr['exists'][1][0])) {
29 var_dump($arr['exists'][1][0]);
41 if (empty($arr['exists'][1])) {
45 var_dump($arr['exists'][1]);
55 if (empty($arr['exists'][1][0])) {
[all …]
H A Dbug40509.phpt7 global $arr;
9 $c = $arr["v"];
13 $arr["v"] = array("a");
15 var_dump(key($arr["v"]));
17 var_dump(key($arr["v"]));
18 foreach ($arr["v"] as $k => $v) {
21 var_dump(key($arr["v"]));
H A Doffset_array.phpt6 $arr = array(1,2,3,4,5,6,7,8);
8 var_dump($arr[1]);
9 var_dump($arr[0.0836]);
10 var_dump($arr[NULL]);
11 var_dump($arr["run away"]);
13 var_dump($arr[TRUE]);
14 var_dump($arr[FALSE]);
17 var_dump($arr[$fp]);
21 var_dump($arr[$obj]);
28 var_dump($arr[$arr1]);
/php-src/ext/odbc/tests/
H A Dodbc_fetch_into_001.phpt19 $arr = [];
20 var_dump(odbc_fetch_into($res, $arr));
21 var_dump($arr);
22 $arr = [];
23 var_dump(odbc_fetch_into($res, $arr, 0));
24 var_dump($arr);
25 $arr = [];
26 var_dump(odbc_fetch_into($res, $arr, 2));
27 var_dump($arr);
28 $arr = [];
[all …]
/php-src/Zend/tests/numeric_strings/
H A Darray_offset.phpt8 var_dump($arr["7"]);
9 var_dump($arr["7.5"]);
10 var_dump($arr[" 7"]);
11 var_dump($arr[" 7.5"]);
12 var_dump($arr[" 7 "]);
14 var_dump($arr["7 "]);
15 var_dump($arr["7.5 "]);
16 var_dump($arr["7str"]);
24 var_dump($arr["0xA"]);
25 var_dump($arr["0b10"]);
[all …]
/php-src/Zend/tests/dereference/
H A Ddereference_011.phpt9 public $arr;
12 return $this->arr;
21 var_dump($foo->a()[1]->arr[1]->a()[1]->arr[1]->arr[0]);
23 var_dump($foo->a()[1]->arr[1]);
29 ["arr"]=>
38 ["arr"]=>
/php-src/ext/spl/tests/
H A Dgh16478.phpt8 global $arr;
9 $arr->setSize(0);
13 $arr = new SplFixedArray(2);
14 $arr[0] = new C;
15 unset($arr[0]);
16 var_dump($arr);
/php-src/ext/phar/tests/cache_list/files/
H A Dwrite6.phar7 $arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP…
8 $arr = $phar->buildFromDirectory($d);
9 ksort($arr);
10 var_dump($arr);
12 $arr = array();
14 $arr[$name] = $file->getContent();
16 ksort($arr);
17 foreach ($arr as $name => $content) {
H A Dwrite6.phar.inc13 $arr = $phar->buildFromIterator(new RecursiveDirectoryIterator($d, RecursiveDirectoryIterator::SKIP…
14 $arr = $phar->buildFromDirectory($d);
15 ksort($arr);
16 var_dump($arr);
18 $arr = array();
20 $arr[$name] = $file->getContent();
22 ksort($arr);
23 foreach ($arr as $name => $content) {
H A Dwrite5.phar7 $arr = $phar->buildFromDirectory($d);
8 ksort($arr);
9 var_dump($arr);
11 $arr = array();
13 $arr[$name] = $file->getContent();
15 ksort($arr);
16 foreach ($arr as $name => $content) {
H A Dwrite5.phar.inc13 $arr = $phar->buildFromDirectory($d);
14 ksort($arr);
15 var_dump($arr);
17 $arr = array();
19 $arr[$name] = $file->getContent();
21 ksort($arr);
22 foreach ($arr as $name => $content) {
/php-src/ext/sysvmsg/tests/
H A D004.phpt12 $arr = array('msg_perm.mode' => 0600);
13 var_dump(msg_set_queue($q, $arr));
15 var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0);
18 $arr = array('msg_perm.uid' => getmyuid());
19 var_dump(msg_set_queue($q, $arr));
21 var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0);
24 $arr = array('msg_perm.gid' => getmygid());
25 var_dump(msg_set_queue($q, $arr));
27 var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0);
31 $arr = array('msg_qbytes' => ($res['msg_qbytes'] -1));
[all …]
/php-src/tests/lang/operators/
H A Dcoalesce.phpt12 $arr = [
34 var_dump($arr["qux"]->boo ?? 3);
35 var_dump($arr["qux"]->bing ?? 3);
37 var_dump($arr[2] ?? 3);
38 var_dump($arr["foo"] ?? 3);
39 var_dump($arr["foobar"] ?? 3);
40 var_dump($arr["qux"] ?? 3);
41 var_dump($arr["bing"][0] ?? 3);
42 var_dump($arr["bing"][1] ?? 3);
/php-src/ext/standard/tests/strings/
H A Dparse_str_basic4.phpt6 $str = "arr[1=sid&arr[4][2=fred";
10 $str = "arr1]=sid&arr[4]2]=fred";
14 $str = "arr[one=sid&arr[4][two=fred";
24 $str = "arr.test[1]=sid&arr test[4][two]=fred";
34 ["arr"]=>
44 ["arr"]=>
54 ["arr"]=>

Completed in 26 milliseconds

12345678910>>...12