note 126076 added to function.each

From: Date: Thu, 13 May 2021 10:58:50 +0000
Subject: note 126076 added to function.each
Groups: php.notes 
Request: Send a blank email to php-notes+get-216381@lists.php.net to get a copy of this message
This function is marked as deprecated in PHP 7.2.0 and is removed in PHP 8.0.0, the replacement for legacy code would look like this: function legacy_each($array){ $key = key($array); $value = current($array); $each = is_null($key) ? false : [ 1 => $value, 'value' => $value, 0 => $key, 'key' => $key, ]; next($array); return $each; } ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 213.94.6.175) ---- Manual Page -- https://php.net/manual/en/function.each.php Edit -- https://main.php.net/note/edit/126076 Del: integrated -- https://main.php.net/note/delete/126076/integrated Del: useless -- https://main.php.net/note/delete/126076/useless Del: bad code -- https://main.php.net/note/delete/126076/bad+code Del: spam -- https://main.php.net/note/delete/126076/spam Del: non-english -- https://main.php.net/note/delete/126076/non-english Del: in docs -- https://main.php.net/note/delete/126076/in+docs Del: other reasons-- https://main.php.net/note/delete/126076 Reject -- https://main.php.net/note/reject/126076 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#216381) next »