создание и продвижение сайта (вбиваю в ТОП-10, как гвозди)Настройка и сопровождение платной рекламы яндекс.директ

PHP. Руководство по PHP. 2005

Longs (Integers) Пред.

Глава 53. Creating Variables

След.

Longs (Integers)

Now let's get to the assignment of data to variables, starting with

longs. Longs are PHP's integers and are very simple to store. Looking at

the zval.value container structure discussed earlier in this

chapter, you can see that the long data type is directly contained in the union,

namely in the lval field. The corresponding

type value for longs is IS_LONG

(see Прим. 53-2).

Пример 53-2. Creation of a long.

zval *new_long;

MAKE_STD_ZVAL(new_long);

new_long->type = IS_LONG;

new_long->value.lval = 10;

Alternatively, you can use the macro ZVAL_LONG:

zval *new_long;

MAKE_STD_ZVAL(new_long);

ZVAL_LONG(new_long, 10);

Пред.

Начало

След.

Creating Variables

Уровень выше

Doubles (Floats)

Отвечу на любые вопросы. С уважением, Дмитрий Владимирович.

Ваше письмо×
Free Web Hosting