diff --git a/language/types/object.xml b/language/types/object.xml index e0f566f92d..c78737e17a 100644 --- a/language/types/object.xml +++ b/language/types/object.xml @@ -45,9 +45,26 @@ $bar->do_foo(); modified. If a value of any other type is converted to an object, a new instance of the stdClass built-in class is created. If the value was &null;, the new instance will be - empty. Arrays convert to an object with properties - named by keys, and corresponding values. For any other value, a member - variable named scalar will contain the value. + empty. An array converts to an object with properties + named by keys and corresponding values, with the exception of numeric keys which + will be inaccessible unless iterated. + + + + + 'foo'); +var_dump(isset($obj->{'1'})); // outputs 'bool(false)' +var_dump(key($obj)); // outputs 'int(1)' +?> +]]> + + + + + For any other value, a member variable named scalar will contain + the value.