FR question: unset() and reset()

From: Date: Thu, 04 Jun 2015 09:49:51 +0000
Subject: FR question: unset() and reset()
Groups: php.standards 
Request: Send a blank email to standards-+get-793@lists.php.net to get a copy of this message
Hello standardisers,

When processing JSON data from an external API, it can be necessary to reset() and advance multiple arrays at the same time.

Unset takes unlimited variables as arguments, but resetting and all array movement (next, prev, end, etc.) takes only one.

	unset($a, $b, $c);
	# vs.
	reset($a);
	reset($b);
	reset($c);

However the array functions provide a return value, and the sort array functions take flags, which is presumably why this group has been harmonised to only take a single argument.

I cannot find this topic in the back catalogue. Has it been considered? Does it have legs to allow multiple arguments in the flag-less array functions?


Have a nice day,
Rasmus


Thread (5 messages)

« previous php.standards (#793) next »