PHP Array Empty?
This is good to know.
Essentially, an array with a single, null value isn't "empty"
However, an array with no keys/values is considered both "empty" and null (loosely).

Written by Trevor N. Suarez
Related protips
1 Response
@mbarzda exactly. Simple to understand, but I can understand how it would trip someone up if they haven't run into it before.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Did you know?
PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#