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

search for in the

ArrayObject::offsetGet> <ArrayObject::getIterator
Last updated: Fri, 26 Dec 2008

view this page in

ArrayObject::offsetExists

(PHP 5)

ArrayObject::offsetExistsVérifie si $index existe

Description

bool ArrayObject::offsetExists ( mixed $index )
Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Liste de paramètres

index

L'index à vérifier.

Valeurs de retour

TRUE si $index existe, FALSE sinon.



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, 26 Dec 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites