Hirdetés
Új hozzászólás Aktív témák
-
Soak
veterán
válasz
Sk8erPeter
#12623
üzenetére
Tudom, azt is tudom mi okozza, de attól még érdekes

-
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;
} -
Soak
veterán
Azért ez tetszett : http://ideone.com/kaImZ6
Új hozzászólás Aktív témák
- Apple iPhone 16 Pro 128GB,Újszerű,Dobozával,12 hónap garanciával
- HIBÁTLAN iPhone 13 mini 128GB Starlight -1 ÉV GARANCIA - Kártyafüggetlen, MS3828
- ASTRO A50 WIRELESS HEADSET + BASE STATION 4th gen. fejhallgató
- Bomba ár! HP EliteBook 845 G7 - Ryzen 5 4650U I 8GB I 256SSD I 14" FHD I Cam I W11 I Gari
- MacBook Pro 13, 14, 15, 16, MacBook Air M1, M2 M3 M4 bill magyarosítás lézerrel / sapkacserével
Állásajánlatok
Cég: ATW Internet Kft.
Város: Budapest
Cég: BroadBit Hungary Kft.
Város: Budakeszi



