Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Counts all elements in an array or in a Countable object
Alias sizeof
count(Countable|array $valueint $mode COUNT_NORMAL): int
    public function countLines()

    {

        return 
count(explode(PHP_EOL$this->text));

    }

}
        $points $this->argument(0)->type('array')->required()->value();

        
$callback $this->argument(1)->type('closure')->value();



        
$vertices_count count($points);




        if (
$vertices_count !== 0) {
    {

        
$array array_values($array);



        if (
count($array) == 4) {




            list(
$r$g$b$a) = $array;
            list($r$g$b$a) = $array;

            
$this->$this->alpha2gd($a);



        } elseif (
count($array) == 3) {




            list(
$r$g$b) = $array;
    public function applyToImage(Image $image$x 0$y 0)

    {

        
$background = new Color($this->background);

        
imagefilledpolygon($image->getCore(), $this->pointsintval(count($this->points) / 2), $background->getInt());

        

        if (
$this->hasBorder()) {

            
$border_color = new Color($this->border_color);
        if ($this->hasBorder()) {

            
$border_color = new Color($this->border_color);

            
imagesetthickness($image->getCore(), $this->border_width);

            
imagepolygon($image->getCore(), $this->pointsintval(count($this->points) / 2), $border_color->getInt());

        }

    

        return 
true;
    {

        
$array array_values($array);



        if (
count($array) == 4) {




            list(
$r$g$b$a) = $array;
            list($r$g$b$a) = $array;



        } elseif (
count($array) == 3) {




            list(
$r$g$b) = $array;
        $img $this->manager()->make('tests/images/exif.jpg');

        
$data $img->exif();

        
$this->assertInternalType('array'$data);

        
$this->assertEquals(19count($data));

    }



    public function 
testExifReadKey()
        $img $this->manager()->make('tests/images/exif.jpg');

        
$data $img->exif();

        
$this->assertInternalType('array'$data);

        
$this->assertGreaterThanOrEqual(13count($data));

    }



    public function 
testExifReadKey()
        $this->assertTrue($result);

        
$this->assertTrue($command->hasOutput());

        
$this->assertInternalType('array'$command->getOutput());

        
$this->assertEquals(4count($command->getOutput()));

    }



    public function 
testGdWithFormat()
        $this->assertTrue($result);

        
$this->assertTrue($command->hasOutput());

        
$this->assertInternalType('array'$command->getOutput());

        
$this->assertEquals(4count($command->getOutput()));

    }



    public function 
testImagickWithFormat()