Thread:Extension talk:Arrays/ arraydefine and arrayindex (Extension:Arrays) vs explode (Extension:ParserFunctions)/reply (3)

The first approach: There is 1 expensive operation
 * in PHP calls function explode (expensive) and saves result (cheap).
 * gets saved result (cheap).

The second approach: There are 2 expensive operations
 * in PHP also calls expensive function explode but here it was twice for same string because it didn't save the result between calls.

Cheap operations are irrelevant here.

In fact there will be no difference, since the most expensive operation here is the usage of magic words. If performance is so critical for you, it can be solved by Extension:PhpTags.