|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-11-24 15:05 UTC] jani@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
[2010-11-24 15:05 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 14:00:01 2025 UTC |
Description: ------------ Many functions perform operation like fetch data from database and return value should be cached. Standard solution: function get_visible_pages(){ static $return = false; if($return === false){ $return = fetch_visible_pages_from_db(); } return $return; } I think php shold automate this in way like: cached function get_visible_pages(){ $return = fetch_visible_pages_from_db(); return $return; } Thanks!