Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Stack/PHP/stack.php
Normal file
11
Task/Stack/PHP/stack.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
$stack = array();
|
||||
|
||||
empty( $stack ); // true
|
||||
|
||||
array_push( $stack, 1 ); // or $stack[] = 1;
|
||||
array_push( $stack, 2 ); // or $stack[] = 2;
|
||||
|
||||
empty( $stack ); // false
|
||||
|
||||
echo array_pop( $stack ); // outputs "2"
|
||||
echo array_pop( $stack ); // outputs "1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue