note 129063 added to function.iterator-to-array

From: Date: Wed, 22 Nov 2023 22:51:39 +0000
Subject: note 129063 added to function.iterator-to-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-221017@lists.php.net to get a copy of this message
As noted, iterator_to_array was widened to allow array arguments in 8.2. So if you're converting iterables into arrays when they might be arrays already, you don't have to check before using this function to make the conversion. When preserve_keys is true, the function is a no-op and just returns the value of the array it was passed; when false, the function becomes equivalent to array_values(). ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 125.239.41.100) ---- Manual Page -- https://php.net/manual/en/function.iterator-to-array.php Edit -- https://main.php.net/note/edit/129063 Del: integrated -- https://main.php.net/note/delete/129063/integrated Del: useless -- https://main.php.net/note/delete/129063/useless Del: bad code -- https://main.php.net/note/delete/129063/bad+code Del: spam -- https://main.php.net/note/delete/129063/spam Del: non-english -- https://main.php.net/note/delete/129063/non-english Del: in docs -- https://main.php.net/note/delete/129063/in+docs Del: other reasons-- https://main.php.net/note/delete/129063 Reject -- https://main.php.net/note/reject/129063 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221017) next »