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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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.4k
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
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
1
100
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
3
270
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
300
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
180
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
Coding as Prompting Since 2025
ragingwind
0
830
Running Swift without an OS
kishikawakatsumi
0
810
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
200
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.4k
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
130
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
320
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
330
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.2k
How GitHub (no longer) Works
holman
316
150k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Color Theory Basics | Prateek | Gurzu
gurzu
0
290
Believing is Seeing
oripsolob
1
110
Paper Plane
katiecoart
PRO
1
49k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Designing for Timeless Needs
cassininazir
0
190
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
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)