Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Config_Ini::offsetSetYaf_Config_Ini::readonly>
^Yaf_Config_IniLast updated: Mon, 26 Oct 2026

Yaf_Config_Ini::offsetUnset

(Yaf >=1.0.0)

Yaf_Config_Ini::offsetUnset — Remove a key (ArrayAccess)

Description

public function Yaf_Config_Ini::offsetUnset(mixed $name): void

Removes a configuration entry by key. This method is called when unset() is used with array syntax on a configuration object.

Parameters

name

The configuration key to remove.

Return Values

No value is returned. A warning is emitted if the configuration is read-only.

Examples

Example #1 Yaf_Config_Ini::offsetUnset() example

<?php
/**
 * Assume /etc/myapp/application.ini contains:
 * [common]
 * application.name = "MyApp"
 * database.host    = "localhost"
 * database.port    = 3306
 */
$config = new Yaf_Config_Ini('/etc/myapp/application.ini', 'common');

// Yaf_Config_Ini is read-only: a warning is emitted, nothing is removed
unset($config['database']);

var_dump(isset($config['database']));
?>

The above example will output something similar to:

bool(true)

See Also


<Yaf_Config_Ini::offsetSetYaf_Config_Ini::readonly>
^Yaf_Config_IniLast updated: Mon, 26 Oct 2026