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
180
Don't fear the paren! 8 reasons you should give Clojure a try
gcapizzi
4
210
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
GoogleCloudとterraform完全に理解した
terisuke
1
200
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
1.3k
AIを導入する前にやるべきこと
negima
2
360
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
370
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
450
PHPer、Cloudflare に引っ越す
suguruooki
2
220
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
160
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
480
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
The Limits of Empathy - UXLibs8
cassininazir
1
330
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
The Curse of the Amulet
leimatthew05
1
12k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
290
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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