Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
3 egyenlőségjel használata esetén nem fogja kiírni.
Bővebben:
http://php.net/manual/en/language.operators.comparison.php
If you compare a number with a string or the comparison involves numerical strings, then each string is converted to a number and the comparison performed numerically. These rules also apply to the switch statement. The type conversion does not take place when the comparison is === or !== as this involves comparing the type as well as the value.
<?php
var_dump(0 == "a"); // 0 == 0 -> true
var_dump("1" == "01"); // 1 == 1 -> true
var_dump("10" == "1e1"); // 10 == 10 -> true
var_dump(100 == "1e2"); // 100 == 100 -> true
switch ("a") {
case 0:
echo "0";
break;
case "a": // never reached because "a" is already matched with 0
echo "a";
break;
}[ Szerkesztve ]
Sk8erPeter
Új hozzászólás Aktív témák
- sziku69: Szólánc.
- Luck Dragon: Asszociációs játék. :)
- sziku69: Fűzzük össze a szavakat :)
- 3D nyomtatás
- Assassin's Creed Shadows - A feudális Japán
- iPhone topik
- Vicces képek
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Ingatlanos topic!
- Samsung Galaxy S22 Ultra - na, kinél van toll?
- További aktív témák...
- Xbox series X+2kontroller+akku
- Samsung G9 Super Ultrawide Gamer monitor! 49"/5120x1440/240hz/1ms/G-sync-Freesync/HDR1000/Beszámítás
- ThinkPad 10.gen.core i5(8x4,2Ghz) FullHd IPS,Vil.bill.8GBDDR4,512GB SSD,Jó akku
- Slim Lenovo,15,6"HD,Intel Silver n5000,4mag!4x2,7Ghz,8GB DDR4 RAM,SSD,jó akku,jó állapot
- Asus játékra is,7.gen.A9 (3,6Ghz),R5+AMD 8500m 2GB videokártyák, 8GB DDR4 RAM,SSD,jó akku,jó állapot