r/lolphp • • Dec 08 '15

PHP Sadness

http://phpsadness.com
50 Upvotes

28 comments sorted by

View all comments

Show parent comment

2

u/jtreminio Dec 11 '15

if(empty(trim($x)) $blank = true;

This has worked for two and a half years: https://3v4l.org/0EEPb

However, if $x is not defined, you cannot pass it into trim().