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
0
2.9k
5 Smashing Changes Your Extension Will Encounter #phpblt
at PHP BLT (11/24)
Rize MISUMI
November 24, 2015
Tweet
Share
More Decks by Rize MISUMI
See All by Rize MISUMI
Effective Espresso #roppongi_aar
misumirize
0
2.3k
Build your APK beyond Docker #dockerlt
misumirize
2
2.9k
某イベントを支えるRuby
misumirize
0
960
Being Flux on Electron
misumirize
2
1.3k
Other Decks in Programming
See All in Programming
メモリリークが発生した時にpprofを使用して原因特定した話
zono33lhd
0
100
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
950
TypeScriptのmoduleオプションを改めて整理する
bicstone
4
420
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
270
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
4
470
💎 My RubyKaigi Effect in 2025: Top Ruby Companies 🌐
yasulab
PRO
1
130
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfold' relates to 'iterate'"
philipschwarz
PRO
0
130
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
790
"使いづらい" をリバースエンジニアリングする UI の読み解き方
rebase_engineering
0
110
SpringBootにおけるオブザーバビリティのなにか
irof
1
890
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
120
What Spring Developers Should Know About Jakarta EE
ivargrimstad
1
600
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
4 Signs Your Business is Dying
shpigford
183
22k
Bash Introduction
62gerente
614
210k
For a Future-Friendly Web
brad_frost
178
9.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Adopting Sorbet at Scale
ufuk
76
9.4k
Designing for humans not robots
tammielis
253
25k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Why Our Code Smells
bkeepers
PRO
336
57k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.8k
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)