1. Return expression
2.Null merge operator
3. Avoid exceptions when you want to access a key that does not exist
4. method_exist
avoid using interfaces as much as possible
5. Make the code expressive
6. Get to the point
7. Initialize the helper once
8. Unpack the array
9. Assign values from an array (useful if the function returns an array)
10.isset
unset
var_dump
accepts several parameters
unset($user, $product) and var_dump($data, 42, $users) are both possible
Post comment 取消回复