We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1f71bd commit ca2e1a4Copy full SHA for ca2e1a4
reference/array/functions/array-unshift.xml
@@ -84,22 +84,29 @@
84
<programlisting role="php">
85
<![CDATA[
86
<?php
87
-$queue = array("orange", "banana");
+$queue = [
88
+ "orange",
89
+ "banana"
90
+];
91
+
92
array_unshift($queue, "apple", "raspberry");
-print_r($queue);
93
+var_dump($queue);
94
?>
95
]]>
96
</programlisting>
97
&example.outputs;
98
<screen role="php">
99
-Array
-(
- [0] => apple
- [1] => raspberry
100
- [2] => orange
101
- [3] => banana
102
-)
+array(4) {
+ [0] =>
+ string(5) "apple"
103
+ [1] =>
104
+ string(9) "raspberry"
105
+ [2] =>
106
+ string(6) "orange"
107
+ [3] =>
108
+ string(6) "banana"
109
+}
110
111
</screen>
112
</example>
0 commit comments