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
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
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
240
Apache Iceberg V3 and migration to V3
tomtanaka
0
210
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
350
Raku Raku Notion 20260128
hareyakayuruyaka
0
410
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
520
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
0
430
組織で育むオブザーバビリティ
ryota_hnk
0
190
kintone + ローカルLLM = ?
akit37
0
110
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
330
Python’s True Superpower
hynek
0
180
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
7
1.1k
AI巻き込み型コードレビューのススメ
nealle
2
2.1k
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
110
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Unsuck your backbone
ammeep
671
58k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
61
エンジニアに許された特別な時間の終わり
watany
106
230k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
GraphQLとの向き合い方2022年版
quramy
50
14k
Statistics for Hackers
jakevdp
799
230k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
620
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)