php_Stopp Posted January 14, 2006 Report Share Posted January 14, 2006 tātad = lieto, lai kaut ko nodefinētu.. == lieto iekš if (un elseif), a kur lieto === ? (kaut kur esu redzējis) Link to comment Share on other sites More sharing options...
Vebers Posted January 14, 2006 Report Share Posted January 14, 2006 === lieto bolean (true, false) tipa pārbaudei. if($test === FALSE) echo 'FALSE'; vai if(!$test) echo 'FALSE'; Link to comment Share on other sites More sharing options...
bubu Posted January 14, 2006 Report Share Posted January 14, 2006 (edited) Muļķības. === var lietot jebkuriem tipiem. === ir tas pats, kas ==, bet atgriezīs true tad un tikai tad, ja abas vērtības būs vienādas nepārvēršot tipus. Tipa "0"==0 => būs true Bet "0"===0 => būs false, jo tikai 0===0 => true Kāpēc cilvēki nelasa dokumentāciju? http://lv.php.net/manual/en/language.opera....comparison.php Edited January 14, 2006 by bubu Link to comment Share on other sites More sharing options...
php_Stopp Posted January 14, 2006 Author Report Share Posted January 14, 2006 nu skaidrs.. paldies Link to comment Share on other sites More sharing options...
ELs Posted January 16, 2006 Report Share Posted January 16, 2006 Kāpēc cilvēki nelasa dokumentāciju? http://lv.php.net/manual/en/language.opera....comparison.php Tāpēc, ka pajautāt ir ātrāk un nav jāmeklē :) Visi mēs esam tikai cilvēki un gribam tā kā ir vienkāršāk :) Link to comment Share on other sites More sharing options...
php_Stopp Posted January 16, 2006 Author Report Share Posted January 16, 2006 šai gadījumā gan tāpēc, ka es nezināju, kur tieši meklēt ;) Link to comment Share on other sites More sharing options...
Delfins Posted January 16, 2006 Report Share Posted January 16, 2006 šai gadījumā gan tāpēc, ka es nezināju, kur tieši meklēt ;) a tu ievadi SEARCH lauciņā... Link to comment Share on other sites More sharing options...
bubu Posted January 16, 2006 Report Share Posted January 16, 2006 = ir operators == arī ir operators. Nu tad pie operatoriem arī jāskatās (ne jau pie mysql funkcijām, vai ne?) Link to comment Share on other sites More sharing options...
Recommended Posts