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
PHP: The good, the bad and the ugly
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Giuseppe Capizzi
December 17, 2012
Programming
390
3
Share
PHP: The good, the bad and the ugly
Giuseppe Capizzi
December 17, 2012
More Decks by Giuseppe Capizzi
See All by Giuseppe Capizzi
A (not so) gentle introduction to functional programming
gcapizzi
1
170
Don't fear the paren! 8 reasons you should give Clojure a try
gcapizzi
4
200
Other Decks in Programming
See All in Programming
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
620
Running Swift without an OS
kishikawakatsumi
0
850
ハーネスエンジニアリングとは?
kinopeee
12
6k
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
3
790
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
24
14k
第3木曜LT会 #28
tinykitten
PRO
0
110
AIエージェントで業務改善してみた
taku271
0
540
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
580
Programming with a DJ Controller — not vibe coding
m_seki
3
140
GitHubCopilotCLIをはじめよう.pdf
htkym
0
240
UIの境界線をデザインする | React Tokyo #15 メイントーク
sasagar
2
380
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
270
Evolving SEO for Evolving Search Engines
ryanjones
0
180
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
680
How to Talk to Developers About Accessibility
jct
2
180
Ethics towards AI in product and experience design
skipperchong
2
260
Leo the Paperboy
mayatellez
7
1.7k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
220
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
Writing Fast Ruby
sferik
630
63k
[SF Ruby Conf 2025] Rails X
palkan
2
970
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Transcript
php the good, the bad & the ugly ?> <?
This is a rant!
the good
(...)
GoodThingsToSay::find("php"); // []
the bad
The PHP hammer
NOT predictable
What’s wrong and what’s not? $foo->nonExistent // Warning $foo::nonExistent //
Fatal error
Type hinting function foo(string $s) {} foo("hello world"); // PHP
Catchable fatal error: Argument 1 passed to foo() must be an instance of string, string given
empty() “ A variable is considered empty if it does
not exist or if its value equals FALSE” $var = ""; empty($var); // true, because "" == false
parse_str() parse_str("first=one&second=two"); echo $first; // one echo $second; // two
NOT consistent
htmlentities / html_entity_decode strpos / str_rot13 php_uname / phpversion base64_encode
/ urlencode, gettype / get_class underscores or not?
array_diff array_fill array_filter count shuffle sort array_* or not?
ascii2ebcdic bin2hex deg2rad strtolower strtotime “to” or “2”?
array_filter($input, $callback) array_map($callback, $input) strpos($haystack, $needle array_search($needle, $haystack) Argument order
NOT reliable
json_decode("null"); // null json_decode("invalid json"); // null json_decode
if (strpos("hello, world!", "hello")) { echo "found!"; } else {
echo "not found :("; } // not found :( array_search, strpos
the ugly
demo!
Not just a rant :)
the good
New stuff ★ Namespaces ★ Closures ★ Traits ★ Better
syntax
New ecosystem
New ecosystem
Conclusions ★ If you can, don’t use it! ★ If
you have to: • know your enemy :) • take advantage of the new goodness