Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
5 Smashing Changes Your Extension Will Encounte...
Search
Rize MISUMI
November 24, 2015
Programming
3k
0
Share
5 Smashing Changes Your Extension Will Encounter #phpblt
at PHP BLT (11/24)
Rize MISUMI
November 24, 2015
More Decks by Rize MISUMI
See All by Rize MISUMI
Effective Espresso #roppongi_aar
misumirize
0
2.5k
Build your APK beyond Docker #dockerlt
misumirize
2
2.9k
某イベントを支えるRuby
misumirize
0
1k
Being Flux on Electron
misumirize
2
1.3k
Other Decks in Programming
See All in Programming
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
Inside Stream API
skrb
1
250
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
15
7.2k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
130
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
140
iOS26時代の新規アプリ開発
yuukiw00w
0
210
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
270
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
4
930
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
160
[BalkanRuby 2026] Drop your app/services!
palkan
3
710
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Modding RubyKaigi for Myself
yui_knk
0
750
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
470
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
410
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
820
Raft: Consensus for Rubyists
vanstee
141
7.5k
A designer walks into a library…
pauljervisheath
211
24k
Ruling the World: When Life Gets Gamed
codingconduct
0
240
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
Everyday Curiosity
cassininazir
0
210
Making Projects Easy
brettharned
120
6.6k
Transcript
5 Smashing Changes Your Extension Will Encounter at PHP7 PHP
BLT #1 / @Misumi_Rize
var_dump($me); → Twitter @Misumi_Rize → GitHub @MisumiRize
Today I talk about...
phpize ./configure make make install
Upgrading extensions for PHP7
gophp7-ext Extensions Catalog https://github.com/gophp7/gophp7-ext/wiki/ extensions-catalog
None
None
How can I upgrade my extension?
Upgrading PHP extensions from PHP5 to NG https://wiki.php.net/phpng-upgrading
First of all: 75% of code will change
Create another branch
php-memcached "php7" branch https://github.com/php-memcached-dev/php- memcached/tree/php7
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
5 Smashing Changes
1. zval
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
2. char* at PHP
zend_string → Replacement of char* and int length → Many
of PHP's API using char* has replaced to zend_string
3. smart_str
smart_string → smart_str is only renamed to smart_string → Struct's
member is also renamed
4. HashTable
HashTable → Most API returns values, not SUCCESS, FAILURE →
char*, length based API (similar to PHP5) remains → But length is changed to exclude trailing zero
5. Objects
None
Conclusion → There's no best practice to upgrade extension now
→ Reading core extensions will help
Addition: interesting thing I've found #if (PHP_MAJOR_VERSION >= 6)