PHP Ds / Sequence unshift () function

PHP

Syntax:
void abstract public DsSequence::unshift ($values)
Parameters: this function takes one parameter, $values, which contains the values ​​to add to the font sequence.Return value:This function does not return any values .The following programs illustrate the Ds / Sequence::unshift()function in PHP:Program 1:  
// Create a new sequence $seq = new DsVector ([12, 15, 18, 20]);  
// Use the unshift() function for
// sequence element $seq -> unshift ( "Geeks" ); $seq -> unshift ( " 1 " , 1); print_r ( $seq );  
?>
Output:
DsVector Object ([0] = > 1 [1] = > 1 [2] = > Geeks [3] = > 12 [4] = > 15 [5] = > 18 [ 6] = > 20)
Program 2:  
// Create a new sequence $seq = new DsVector ([ "Geeks" , "for" , "Geeks" ]);  
// Use the unshift() function for
// sequence element $seq -> unshift (1); $seq -> unshift ( " G " , 10); var_dump ( $seq );  
?>
Output:
object (DsVector) # 1 (6) {[0] = > string (1) "G" [1] = > int (10) [2] = > int (1) [3] = > string (5) "Geeks" [4] = > string (3) "for" [5] = > string (5) "Geeks"}
Link: http: //php.net/manual/en/ds-sequence.unshift.php