PHP 8.6.0 Beta 1 is available for testing

SplFixedArray::toArray

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

SplFixedArray::toArrayDevuelve un array PHP de un array fijo

Descripción

public function SplFixedArray::toArray(): array

Devuelve un array PHP de un array fijo.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Devuelve un array PHP, similar al array fijo.

Ejemplos

Ejemplo #1 Ejemplo de SplFixedArray::toArray()

<?php
$fa = new SplFixedArray(3);
$fa[0] = 0;
$fa[2] = 2;
var_dump($fa->toArray());
?>

El ejemplo anterior mostrará:

array(3) {
 [0]=>
 int(0)
 [1]=>
 NULL
 [2]=>
 int(2)
}

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /