I've picked up from programming in other languages where a conditional statement must return a boolean value (Java, C#)

But I think boolean is if ($condition)

Rickard, why do you use construction like

if ($condition > 0)

, not

if ($condition)

? The last is more readble

? ?? ????? ??? ??? ????? ??? ????? ???? ?? ??? ????????

?? ??, ?? ??? ????? PunBB. ? ?????? PunBB ??? ???????? ???? ??????, ??? ?????? ??? IPB...

ß íå çíàþ êàê â ýòîì ôîðóìå ñ òàáëèöàìè, íî äåëàåööà ýòî çàïðîñîì òèïà òîêîãî:
DELETE FROM pun_users WHERE posts_count = 0;

????? ?? ??????, ????? ? punbb ??? ????? ?? ????? ??????

?? ?? ?????? 2.?.? ???????????? ??? ???????? ?? ???????.

?? ??????? ???? ??? ?? ???????? ?????? ??? phpbb, ?????? ????????? ???????? ?????????? ?????? ?? ????????

???? ???? ????????, ? ?????? ??????? ????. ??????? ????

if($constant == '1')
do_stuff();

???????, ? ??? ? phpBB

if($constant)
{
    do_stuff();
}

???????? ??????? ?????.

?? ? ???????? ??? ??? ???? ??????? ?????..
? ??????? ??? ?? ??????????...

?? ??!? ??? ??? ? ?? ?????????? ?????? ?? ????????? ???????? ???? ?? ??????? ? ???????? phpBB(????? ?????? ???) -> PunBB($constant == 1 ??? ???-??) -> MiniBB(????????? ????????? ??????) -> IPB(???? ????? ???????? ???????)

7

(6 replies, posted in Archive)

??? ?? ??? ???????? ?? ?????? ?????? ???? ??? ??????????? ??????, ????????????? ?? ????? ???.