• PHP Video Tutorials

PHP - Ds Sequence find() Function


Advertisements

Ds\Sequence::find() function can attempt to find the value's index.

Syntax

public abstract mixed Ds\Sequence::find( mixed $value )

Ds\Sequence::find() function can return an index of the value, or false if not found.

Example

<?php
   $sequence = new \Ds\Vector(["a", 1, true]);

   var_dump($sequence->find("a"));  
   var_dump($sequence->find("b"));  
   var_dump($sequence->find("1")); 
   var_dump($sequence->find(1)); 
?>
php_function_reference.htm
Advertisements