GoLang Ds\Stack::push

request it (366)
GoLang replacement for PHP's Ds\Stack::push [edit | history]



Do you know a GoLang replacement for PHP's Ds\Stack::push? Write it!

PHP Ds\Stack::push

PHP original manual for Ds\Stack::push [ show | php.net ]

Ds\Stack::push

(PECL ds >= 1.0.0)

Ds\Stack::pushPushes values onto the stack

Description

public void Ds\Stack::push ([ mixed $...values ] )

Pushes values onto the stack.

Parameters

values

The values to push onto the stack.

Return Values

No value is returned.

Examples

Example #1 Ds\Stack::push() example

<?php
$stack 
= new \Ds\Stack();

$stack->push("a");
$stack->push("b");
$stack->push("c""d");
$stack->push(...["e""f"]);

print_r($stack);
?>

The above example will output something similar to:

Ds\Stack Object
(
    [0] => a
    [1] => b
    [2] => c
    [3] => d
    [4] => e
    [5] => f
)