略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ArrayObject::offsetSet

2024-05-02

ArrayObject::offsetSet

(PHP 5, PHP 7, PHP 8)

ArrayObject::offsetSet为指定索引设定新的值

说明

public ArrayObject::offsetSet(mixed $index, mixed $newval): void

设置指定的索引为新的值

参数

index

将要被设置的索引

newval

参数 index 所对应的新值。

返回值

没有返回值。

范例

示例 #1 ArrayObject::offsetSet() 例子

官方地址:https://www.php.net/manual/en/arrayobject.offsetset.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3