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
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
Performance Engineering for Everyone
elenatanasoiu
0
180
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
RTSPクライアントを自作してみた話
simotin13
0
610
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
360
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
210
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
OSもどきOS
arkw
0
570
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
460
GitHub's CSS Performance
jonrohan
1033
470k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
300
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
HDC tutorial
michielstock
2
720
The agentic SEO stack - context over prompts
schlessera
0
820
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Fireside Chat
paigeccino
42
4k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
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)