Note
When installing extesions from GitHub, pickle is
suitable
https://github.com/FriendsOfPHP/pickle
./bin/pickle install https://github.com/php-memcached-dev/php-memcached.git#php7
Slide 15
Slide 15 text
5 Smashing
Changes
Slide 16
Slide 16 text
1. zval
Slide 17
Slide 17 text
zval
→ zval** Z_*_PP() is obsolete
→ Change to use zval*
→ PHP7 frequently uses zval directly
→ ALLOC_ZVAL, ALLOC_INIT_ZVAL, MAKE_STD_ZVAL has
removed
Slide 18
Slide 18 text
2. char* at PHP
Slide 19
Slide 19 text
zend_string
→ Replacement of char* and int length
→ Many of PHP's API using char* has replaced to
zend_string
Slide 20
Slide 20 text
3. smart_str
Slide 21
Slide 21 text
smart_string
→ smart_str is only renamed to smart_string
→ Struct's member is also renamed
Slide 22
Slide 22 text
4. HashTable
Slide 23
Slide 23 text
HashTable
→ Most API returns values, not SUCCESS, FAILURE
→ char*, length based API (similar to PHP5) remains
→ But length is changed to exclude trailing zero
Slide 24
Slide 24 text
5. Objects
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
Conclusion
→ There's no best practice to upgrade extension
now
→ Reading core extensions will help
Slide 27
Slide 27 text
Addition: interesting thing I've found
#if (PHP_MAJOR_VERSION >= 6)