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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rize MISUMI
November 24, 2015
Programming
3.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
450
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
今さら聞けない .NET CLI
htkym
0
180
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
170
FDEが実現するAI駆動経営の現在地
gonta
2
260
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
440
その節約、円になってますか?
isamumumu
1
680
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
200
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
960
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
650
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.4k
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.5k
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
230
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
200
How to Talk to Developers About Accessibility
jct
2
480
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
610
エンジニアに許された特別な時間の終わり
watany
108
250k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
360
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
190
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Are puppies a ranking factor?
jonoalderson
1
3.8k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
400
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)