Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://oit.cmc.msu.ru/php/zend.variables.long.html
Дата изменения: Sun Feb 3 22:58:54 2002 Дата индексирования: Mon Oct 1 21:32:48 2012 Кодировка: |
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 Listing 9.11).
Figure 33-2. Listing 9.11. Creation of a long.
zval *new_long; MAKE_STD_ZVAL(new_long); new_long->type = IS_LONG; new_long->value.lval = 10; |
zval *new_long; MAKE_STD_ZVAL(new_long); ZVAL_LONG(new_long, 10); |