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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rize MISUMI
November 24, 2015
Programming
0
3k
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.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
Oxlintはいいぞ
yug1224
5
1.2k
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
410
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1k
AtCoder Conference 2025
shindannin
0
1k
Architectural Extensions
denyspoltorak
0
250
2026年 エンジニアリング自己学習法
yumechi
0
120
AI時代の認知負荷との向き合い方
optfit
0
110
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
360
CSC307 Lecture 04
javiergs
PRO
0
650
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
670
Implementation Patterns
denyspoltorak
0
270
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
620
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Testing 201, or: Great Expectations
jmmastey
46
8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
150
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
sira's awesome portfolio website redesign presentation
elsirapls
0
140
Six Lessons from altMBA
skipperchong
29
4.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
110
Code Reviewing Like a Champion
maltzj
527
40k
How to make the Groovebox
asonas
2
1.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
110
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)