• PHP Video Tutorials

PHP - Ds Sequence sorted() Function


Advertisements

Ds\Sequence::sorted() function can return a sorted copy.

Syntax

public abstract Ds\Sequence Ds\Sequence::sorted([ callable $comparator ] )

Ds\Sequence::sorted() function can return a sorted copy by using an optional comparator function.

Ds\Sequence::sorted() function can return a sorted copy of the sequence.

Example 1

<?php 
   $seq = new \Ds\Vector([2, 7, 1, 9, 6, 5, 12, 20]); 
   print_r($seq->sorted()); 
?>

Example 2

<?php 
   $seq = new \Ds\Vector(["TRR" "SAT", "JAT", "TPP"]); 
   print_r($seq->sorted());
?>
php_function_reference.htm

Useful Video Courses


Video

PHP Online Training

45 Lectures 9 hours

Malhar Lathkar

Video

Become PHP Facebook Developer: Password-Less Authentication

34 Lectures 4 hours

Syed Raza

Video

Ultimate PHP & MySQL Web Development Course & OOP Coding

84 Lectures 5.5 hours

Frahaan Hussain

Video

Learn PHP from Scratch

17 Lectures 1 hours

Nivedita Jain

Video

E Commerce Website Development In PHP With PDO

100 Lectures 34 hours

Azaz Patel

Video

PHP in Telugu

43 Lectures 5.5 hours

Vijay Kumar Parvatha Reddy

Advertisements