Oihana PHP

values.php

Table of Contents

Functions

values()  : array<int, mixed>
Returns the list of public property values of an object.

Functions

values()

Returns the list of public property values of an object.

values(object $object) : array<int, mixed>

Only the accessible (public and dynamic) property values are returned, in declaration order, mirroring the behaviour of get_object_vars() from outside the class.

Parameters
$object : object

The source object.

Tags
example
use function oihana\core\objects\values;

$user = (object) [ 'id' => 42 , 'name' => 'Alice' ] ;

values( $user ) ; // [ 42 , 'Alice' ]
author

Marc Alcaraz (ekameleon)

since
1.0.9
Return values
array<int, mixed>

A list of the object's public property values.

On this page

Search results