Dab tsi yog qhov txawv ntawm qhov tuag thiab tawm?
Dab tsi yog qhov txawv ntawm qhov tuag thiab tawm?

Video: Dab tsi yog qhov txawv ntawm qhov tuag thiab tawm?

Video: Dab tsi yog qhov txawv ntawm qhov tuag thiab tawm?
Video: Dab ntxwg nyoos yog leej twg ...zaj no zoo heev. 2024, Kaum ib hlis
Anonim

2. Yeej tuag yog siv los pov ib qho kev zam thaum tawm tsis yog, nws tsuas yog siv rau tawm txheej txheem. 3. Cov tuag () muaj nuj nqi yog siv los luam cov lus thiab tawm tsab ntawv los yog nws yuav raug siv los luam lwm cov lus.

Kuj nug, kuv yuav ua li cas tawm ntawm PHP tsab ntawv?

Cov tawm () muaj nuj nqi terminates execution ntawm lub tsab ntawv . Nws luam cov xwm txheej ua ntej tawm . Yog tias cov xwm txheej yog tus lej, tus nqi ntawd kuj yuav raug siv los ua tus tawm xwm txheej. Tawm Cov xwm txheej yuav tsum nyob hauv thaj tsam 0 txog 254, qhov tawm xwm txheej 255 yog tseg los ntawm PHP thiab yuav tsum tsis txhob siv.

Ib sab saum toj no, qhov txawv ntawm suav nrog thiab xav tau yog dab tsi? Cov qhov sib txawv ntawm suav nrog thiab xav tau tshwm sim thaum cov ntaub ntawv yog suav nrog nrhiav tsis tau: suav nrog yuav emit ceeb toom (E_WARNING) thiab tsab ntawv yuav mus ntxiv, whereas xav tau yuav tawm qhov yuam kev tuag (E_COMPILE_ERROR) thiab nres cov ntawv. suav nrog yuav rov qab cuav yog tias tsis pom cov ntaub ntawv.

Kuj Paub, dab tsi yog kev siv tuag hauv PHP?

Cov tuag () yog ib txoj haujlwm inbuilt hauv PHP . Nws yog siv los luam cov lus thiab tawm ntawm qhov tam sim no php ib tsab ntawv. Nws yog sib npaug rau exit() ua haujlwm hauv PHP.

Isset hauv PHP yog dab tsi?

Cov isset () muaj nuj nqi yog siv los xyuas seb qhov sib txawv tau teeb tsa lossis tsis. Yog tias qhov hloov pauv twb tsis tau teeb tsa nrog unset() muaj nuj nqi, nws yuav tsis raug teeb tsa lawm. Cov isset () ua haujlwm rov qab tsis tseeb yog tias qhov ntsuas qhov sib txawv muaj tus nqi NULL. Version: Syntax: isset (variable1, sib txawv 2)

Pom zoo: