← Back to team overview

mahara-contributors team mailing list archive

[Bug 1185693] Re: Replace a one-off function-in-function with an anonymous function

 

Are you meaning the use of create_function() that is peppered thru
mahara code? As I noticed that PHP.net says:

Caution:  This function internally performs an eval() and as such has
the same security issues as eval(). Additionally it has bad performance
and memory usage characteristics. If you are using PHP 5.3.0 or newer a
native anonymous function should be used instead.

So I guess we should convert those to anonymous functions soon

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1185693

Title:
  Replace a one-off function-in-function with an anonymous function

Status in Mahara ePortfolio:
  In Progress

Bug description:
  It does provide slightly better performance to use a standalone
  function, but using an anonymous function avoids the possibility of
  namespace collisions and arguably makes the intention of the code more
  readable.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1185693/+subscriptions


References