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
420
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
220
Don't fear the paren! 8 reasons you should give Clojure a try
gcapizzi
4
230
Other Decks in Programming
See All in Programming
AI-Powered Domain-Driven Design
ziobrando
0
420
Event is what happens
moro
2
4k
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
170
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
160
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
130
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
GraphQL の onError と Nullability のこれから
quramy
0
210
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
11k
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
510
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Everyday Curiosity
cassininazir
0
400
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
A Tale of Four Properties
chriscoyier
163
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Making Projects Easy
brettharned
120
6.9k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.4k
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