Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
990
Being Flux on Electron
misumirize
2
1.3k
Other Decks in Programming
See All in Programming
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
Rubyで鍛える仕組み化プロヂュース力
muryoimpl
0
160
AIコーディングエージェント(NotebookLM)
kondai24
0
230
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
110
開発に寄りそう自動テストの実現
goyoki
2
1.4k
Python札幌 LT資料
t3tra
6
1k
認証・認可の基本を学ぼう前編
kouyuume
0
270
Grafana:建立系統全知視角的捷徑
blueswen
0
200
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.3k
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
Java 25, Nuevas características
czelabueno
0
110
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
370
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
310
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
190
Design in an AI World
tapps
0
100
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
The browser strikes back
jonoalderson
0
120
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
How GitHub (no longer) Works
holman
316
140k
A better future with KSS
kneath
240
18k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
73
The Art of Programming - Codeland 2020
erikaheidi
56
14k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
63
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
130
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)