מספר
שלם
הוא
מספר
מהקבוצה
Z
=
{
...
,
-2
,
-1
,
0
,
1
,
2
,..
.
}
.
ראה
גם
:
מספרים
שלמים
בעלי
אורך
שרירותי
ו
-
מספרים
בעלי
נקודה
צפה
.
דוגמה
6-1
.
$a
=
1234
;
#
decimal
number
$a
=
-123
;
#
a
negative
number
$a
=
0123
;
#
octal
number
(equivalent
to
83
decimal
)
$a
=
0x1A
;
#
hexadecimal
number
(equivalent
to
26
decimal
)
|
|
The size of an integer is platform-dependent, although a
maximum value of about two billion is the usual value (that's
32 bits signed). PHP does not support unsigned integers.
However
,
in
most
cases
you
do
not
need
to
use
the
cast
,
since
a
value
will
be
automatically
converted
if
an
operator
,
function
or
control
structure
requires
a
integer
argument
.
זהירות
|
However
,
do
not
relay
on
this
behaviour
,
as
it
can
change
without
notice
.
|