Req #60831 [Opn->Bgs]: Optimization

From: Date: Sat, 21 Jan 2012 14:43:47 +0000
Subject: Req #60831 [Opn->Bgs]: Optimization
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-166673@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60831&edit=1 ID: 60831 Updated by: dtajchreber@php.net Reported by: iivanov2 at yahoo dot com Summary: Optimization -Status: Open +Status: Bogus Type: Feature/Change Request Package: *Programming Data Structures Operating System: no matter PHP Version: 5.4.0RC6 Block user comment: N Private report: N New Comment: PHP already does this. [1] http://us.php.net/manual/en/language.operators.logical.php [2] http://en.wikipedia.org/wiki/Short-circuit_evaluation Previous Comments: ------------------------------------------------------------------------ [2012-01-21 14:09:39] iivanov2 at yahoo dot com Description: ------------ First sorry for my English, it's not perfect. In this case if($a==1 and $b==2) { echo 'hello there'; } I think $b==2 checking is unnecessary if $a==1 it's not true. PHP will be faster. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60831&edit=1

« previous php.bugs (#166673) next »