diff --git a/faq/using.xml b/faq/using.xml index f728b39cba..09599c19ab 100644 --- a/faq/using.xml +++ b/faq/using.xml @@ -12,7 +12,6 @@ - I cannot remember the parameter order of PHP functions, are they random? @@ -29,6 +28,10 @@ String functions are the opposite, so "haystack, needle". + + As of PHP 8.0, named arguments + allow passing arguments by parameter name, making parameter order less of a concern. + @@ -79,7 +82,6 @@ if (empty($empty)) { - I need to convert all single-quotes (') to a backslash @@ -98,6 +100,12 @@ if (empty($empty)) { stripslashes functions, that are more common with older PHP code. + + Manually escaping values is error-prone and depends on context. + Prefer using database APIs that support prepared statements and + parameter binding instead of constructing queries by concatenating + escaped strings. +