格式化以下代码行的更体面的方法是什么。如果不格式化,任何其他方法也可以。
if (
array_key_exists('type',$handle) &&
array_key_exists('parent',$handle) &&
array_key_exists('userName',$handle) &&
array_key_exists('userId',$handle) &&
array_key_exists('countryCode',$handle)
)
if(
ctype_digit($listType) &&
ctype_digit($listParent) &&
(ctype_alnum($listUserName) && (strlen($listUserName) >=5 && strlen($listUserName) <=24)) && ctype_digit($listUserId) &&
(ctype_alpha($listCountryCode) &&
array_key_exists($listCountryCode, $countries))
)
另外,这样的事情在php中可行吗?
bool fTest1 = A == B ;
bool fTest2 = C ;
bool fTest3 = f(1,2,3) ;
bool fSuccess = ( fTest1 | ftest2 ) & fTest3 ;
if ( fSuccess )
...