We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bed4dfe commit a0d4abaCopy full SHA for a0d4aba
array.php
@@ -0,0 +1,28 @@
1
+<?php
2
+// array
3
+
4
+$list = array(1, 2, 3, 4);
5
+$list = [1, 2, 3, 4];
6
7
+print_r($list);
8
9
+array_push($list, 50);
10
+$list[] = 600;
11
12
13
14
+// remove last element
15
+array_pop($list);
16
17
18
+// remove first element
19
+array_shift($list);
20
21
22
+$res = array_pop($list);
23
+var_dump($res);
24
25
+$res = array_shift($list);
26
27
28
0 commit comments