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

search for in the

ArrayObject::offsetGet> <ArrayObject::getIterator
Last updated: Fri, 01 Aug 2008

view this page in

ArrayObject::offsetExists

(PHP 5)

ArrayObject::offsetExistsReturns whether the requested $index exists

Descrierea

bool ArrayObject::offsetExists ( mixed $index )
Avertizare

Această funcţie nu este documentată în prezent; este disponibilă numai lista sa de argumente.

Parametri

index

The index being checked.

Valorile întroarse

TRUE if the requested $index exists, otherwise FALSE



add a note add a note User Contributed Notes
ArrayObject::offsetExists
goran at extensionsforjoomla dot com
09-Jul-2007 12:52
In versions prior to PHP 5.2.2 offsetExists() would return false if index value is null.
<?php
// running PHP 5.2.1
$params = new ArrayObject(array('INT'=>null, 'STR'=> null, 'BOOL'=>null, 'LOB'=>null));
$test = $params->offsetExists('INT');
var_dump($test);
// result would be bool(false)
// running PHP 5.2.2
$params = new ArrayObject(array('INT'=>null, 'STR'=> null, 'BOOL'=>null, 'LOB'=>null));
$test = $params->offsetExists('INT');
var_dump($test);
// result would be bool(true)
?>
Both tests where made on Windows platform.

ArrayObject::offsetGet> <ArrayObject::getIterator
Last updated: Fri, 01 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites