Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PHP: The good, the bad and the ugly
Search
Giuseppe Capizzi
December 17, 2012
Programming
410
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
210
Don't fear the paren! 8 reasons you should give Clojure a try
gcapizzi
4
220
Other Decks in Programming
See All in Programming
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1k
パスワード再設定メールのURLについて知っておこう
uyuki234
0
170
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
180
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
270
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Balancing Empowerment & Direction
lara
6
1.3k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
430
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Why Our Code Smells
bkeepers
PRO
340
58k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
My Coaching Mixtape
mlcsv
0
360
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
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