This is my first php program!



Download 6,9 Mb.
Pdf ko'rish
bet39/69
Sana26.02.2022
Hajmi6,9 Mb.
#471647
1   ...   35   36   37   38   39   40   41   42   ...   69
Bog'liq
PHP

46
|
Chapter 2: Language Basics
Bitwise-OR-equals (
|=
)
Performs a bitwise OR on the value of the lefthand operand and the righthand
operand, then assigns the result to the lefthand operand.
Concatenate-equals (
.=
)
Concatenates the righthand operand to the value of the lefthand operand, then
assigns the result to the lefthand operand.
Miscellaneous Operators
The remaining PHP operators are for error suppression, executing an external com-
mand, and selecting values:
Error suppression (
@
)
Some operators or functions can generate error messages. The error suppression
operator, discussed in full in Chapter 13, is used to prevent these messages from
being created.
Execution (
`...`
)
The backtick operator executes the string contained between the backticks as a
shell command and returns the output. For example:
$listing = `ls –ls /tmp`;
echo $listing;
Conditional (
?:
)
The conditional operator is, depending on the code you look at, either the most
overused or most underused operator. It is the only ternary (three-operand)
operator and is therefore sometimes just called the ternary operator.
The conditional operator evaluates the expression before the
?
. If the expression
is
true
, the operator returns the value of the expression between the
?
and
:
;
otherwise, the operator returns the value of the expression after the
:
. For
instance:
">
If text for the link
$url
is present in the variable
$linktext
, it is used as the text
for the link; otherwise, the URL itself is displayed.
Flow-Control Statements
PHP supports a number of traditional programming constructs for controlling the
flow of execution of a program.
Conditional statements, such as
if
/
else
and
switch
, allow a program to execute dif-
ferent pieces of code, or none at all, depending on some condition. Loops, such as
while
and
for
, support the repeated execution of particular code.
,ch02.15294 Page 46 Wednesday, March 13, 2002 11:42 AM


This is the Title of the Book, eMatter Edition
Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.

Download 6,9 Mb.

Do'stlaringiz bilan baham:
1   ...   35   36   37   38   39   40   41   42   ...   69




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish