Project

General

Profile

Actions

Task #80283

closed

Use direct array assignments instead of array_push

Added by Cedric Ziel about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2017-03-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

This is a micro optimization, since array_push is slower than direct assignments.

Direct assignments are also more readable than array_push. Occurrences with only one element in the value list should be changed to direct assignments.

Tiny little benchmark, just in case someone wants to have a look: https://3v4l.org/tk351

Actions

Also available in: Atom PDF