note 112458 deleted from function.array-key-exists by crell

From: Date: Wed, 29 Jun 2022 20:39:22 +0000
Subject: note 112458 deleted from function.array-key-exists by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218748@lists.php.net to get a copy of this message
Note Submitter: Sandro Alves Peres ---- <?php /* It also works on objects *************************************** */ class PHP { private $compiler; protected $architecture; public $version; public $system = "Linux"; } $php = new PHP(); $a = array_key_exists('compiler', $php); # false $b = array_key_exists('architecture', $php); # false $c = array_key_exists('version', $php); # true $d = array_key_exists('system', $php); # true var_dump( $a, $b, $c, $d ); ?>

« previous php.notes (#218748) next »