Phpml\Math\Set::toArray PHP Method

toArray() public method

public toArray ( ) : array
return array
    public function toArray() : array
    {
        return $this->elements;
    }

Usage Example

Example #1
0
 public function testToArray()
 {
     $set = new Set([1, 2, 2, 3, 'A', false, '', 1.1, -1, -10, 'B']);
     $this->assertEquals([-10, '', -1, 'A', 'B', 1, 1.1, 2, 3], $set->toArray());
 }