Can I use if(4 <= $a <= 44)instead if(4 <= $a && $a <= 44)?
if(4 <= $a <= 44)
if(4 <= $a && $a <= 44)
No, you cannot do this.
if(4 <= $a <= 44)equivalent to if((4 <= $a) <= 44). This may be equivalent to if(false <= 44)or if(true <= 44), none of which makes sense.
if((4 <= $a) <= 44)
if(false <= 44)
if(true <= 44)
No, you can’t.
if(4 <= $a <= 44)will (I believe) be parsed as if ((4 <= $a) <= 44), which checks that (4 <= $a)(i.e. 0 or 1) is less than 44.
if ((4 <= $a) <= 44)
(4 <= $a)
, ( ).
PHP, ,
4 <= $a <= 44
. .
Source: https://habr.com/ru/post/1744417/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1744412/jms-message-model-to-include-data-or-pointers-to-data&usg=ALkJrhierG2PylGEgWhCcY8Ra5wAA2V9eQConfiguring an sql statement in an input-based function - sqlКак избежать "Недопустимый тип в постоянном пуле" с использованием "ldc_w" в Jasmin? - javaHow can I refresh the page through jQuery and make sure there is a connection? - jqueryПередача DataTable в хранимую процедуру. Есть ли способ лучше? - sqlPHP: prepared statement, IF statement required - programming-languages | fooobar.comHow to copy subdirectories of several unnamed directories - antsteps / ideas for Iphone code, for example, the user interface for the application - apiStellar scheme [fact 1: n dimension] ... how? - olapIncorrect parameter when using IsNull in MySQL - joinAll Articles