downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ArrayObject::getIterator> <ArrayObject::getArrayCopy
Last updated: Fri, 20 Nov 2009

view this page in

ArrayObject::getFlags

(PHP 5 >= 5.1.0)

ArrayObject::getFlagsGets the behavior flags.

Description

int ArrayObject::getFlags ( void )

Gets the behavior flags of the ArrayObject. See the ArrayObject::setFlags method for a list of the available flags.

Parameters

This function has no parameters.

Return Values

Returns the behavior flags of the ArrayObject.

Examples

Example #1 ArrayObject::getFlags() example

<?php
// Array of available fruits
$fruits = array("lemons" => 1"oranges" => 4"bananas" => 5"apples" => 10);

$fruitsArrayObject = new ArrayObject($fruits);

// Get the current flags
$flags $fruitsArrayObject->getFlags();
var_dump($flags);

// Set new flags
$fruitsArrayObject->setFlags(ArrayObject::ARRAY_AS_PROPS);

// Get the new flags
$flags $fruitsArrayObject->getFlags();
var_dump($flags);
?>

The above example will output:

int(0)
int(2)

See Also



add a note add a note User Contributed Notes
ArrayObject::getFlags
There are no user contributed notes for this page.

ArrayObject::getIterator> <ArrayObject::getArrayCopy
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites