Puas yog PHP luv Circuit Court?
Puas yog PHP luv Circuit Court?

Video: Puas yog PHP luv Circuit Court?

Video: Puas yog PHP luv Circuit Court?
Video: Lub Chaw Nco - DragonFire (Official MV) #KhosiabChannel 2024, Hlis ntuj nqeg
Anonim

Qhov no txhais tau tias koj tuaj yeem, piv txwv li, txheeb xyuas seb avariable puas tau teeb tsa thiab seb nws puas tau teeb tsa rau qee tus nqi-yog tias qhov hloov pauv tsis tau teeb tsa, PHP yuav luv - Circuit Court lub if statement thiab tsis kos nws tus nqi. Qhov no yog qhov zoo vim tias yog tias koj txheeb xyuas tus nqi ntawm qhov tsis hloov pauv, PHP yuav chij qhov yuam kev.

Ntxiv rau qhov no, C puas muaj kev ntsuas luv luv?

" Short Circuiting "feem ntau yog hais txog" Kev ntsuam xyuas ShortCircuit "uas yog lub tswvyim dav dav, tsis yog xwb C tshwj xeeb. Boolean operators kev soj ntsuam sab laug toright, yog li txhua nqe lus uas yuav ua rau lwm cov ntsiab lus tsis tsim nyog yog pab tau.

Tsis tas li ntawd, kev ntsuam xyuas luv luv Boolean yog dab tsi? Luv luv - kev ntsuam xyuas Circuit Court , tsawg heev kev soj ntsuam los yog McCarthy kev soj ntsuam (tom qab JohnMcCarthy) yog cov semantics ntawm qee tus Boolean cov neeg ua haujlwm hauv qee hom lus programming uas qhov kev sib cav thib ob raug tua lossis ntsuas tsuas yog tias thawj qhov kev sib cav tsis txaus los txiav txim siab tus nqi ntawm qhov kev qhia: thaum thawj

Ib yam li ntawd, nws tau nug, qhov kev ntsuam xyuas luv luv Boolean yog dab tsi Vim li cas nws thiaj li muaj txiaj ntsig?

Luv luv - kev ntsuam xyuas Circuit Court txhais tias thaum twg ntsuas boolean kab lus (logical THIAB thiab LOS YOG) koj tuaj yeem nres sai li sai tau thaum koj pom thawj qhov xwm txheej uas txaus siab ornegates qhov kev qhia.

&& txhais li cas hauv PHP?

' && ' Operator Cov && tus neeg teb xov tooj hu ua logicaloperator. Nws rov qab muaj tseeb yog tias ob qho tib si operands muaj tseeb.

Pom zoo: