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
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
継続モナドとリアクティブプログラミング
yukikurage
3
680
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
170
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
140
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.6k
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
200
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
390
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
280
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
820
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
120
What's New in Android 2026
veronikapj
0
250
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
240
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
4 Signs Your Business is Dying
shpigford
187
22k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
380
sira's awesome portfolio website redesign presentation
elsirapls
0
320
Why Our Code Smells
bkeepers
PRO
340
58k
How to Talk to Developers About Accessibility
jct
2
480
How GitHub (no longer) Works
holman
316
150k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
450
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
820
ラッコキーワード サービス紹介資料
rakko
1
4.2M
Crafting Experiences
bethany
1
240
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
790
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)