Issue Task Closed

#55518Use variable array access instead of strlen($a) > 0

Michiel Roos 01/31/14, 15:01 updated 01/31/14, 22:56

Description

Checking if a string has any length greater than 0 characters can be done cheaply using variable array access:

Use:
if ($string{0}) {

Instead of:
if (strlen($string) > 0) {
if (strlen($string)) {

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.