Developing while learning and helping others.
Top PHP issues I see on SO and my suggestions:
mysql_*
functions. They are deprecated. Instead, look into using PDO
along with binding values. Be aware that bindValue
and bindParam
work differently.
DateTime
object instead. Convert all of your time stamps in tables to the DATETIME
type as well. You'll no longer have to worry about which PHP architecture you're on and you'll have a plethora of functionality readily available instead of writing your own.&
), by using the use
keyword. Example:$externalVar = 10; print_r(array_map(function($value) use (&$externalVar) { $externalVar++; return $value * $externalVar; }, range(1, 10)));