Project

General

Profile

Actions

Task #54085

closed

Epic #55070: Workpackages

Epic #55065: WP: Overall System Performance (Backend and Frontend)

Story #55078: Optimize PHP code performance in TYPO3 methods

Replace all strcmp() calls with ===

Added by Markus Klein over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
Start date:
2013-11-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

Description

When testing for the identity of strings using the strcmp() function has worse performance than the === operator. (3-5x)

Replace all ~300 calls to strcmp() with the operator.

Attention: This is replacement only works when the return value of strcmp() is checked for being a boolean value, otherwise a string ordering is performed and the call MUST NOT be replaced!

The operator is also slower than the = operator, so use the latter one if possible.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Task #54265: Use (int) instead of intval() or (integer)ClosedJo Hasenau2013-12-07

Actions
Related to TYPO3 Core - Task #54517: Replace substr() and strpos() with GeneralUtility::isFirstPartOfString when it makes senseRejectedJo Hasenau2013-12-19

Actions
Related to TYPO3 Core - Bug #56248: You can not add new records (TCA) in the edit modeClosed2014-02-24

Actions
Related to TYPO3 Core - Bug #58525: First usergroup from BE-user no longer applied to new pagesClosed2014-05-05

Actions
Related to TYPO3 Core - Task #56393: creation on new pages have broken permissions (perms_groupid set wrong)Closed2014-02-27

Actions
Actions

Also available in: Atom PDF