当我使用_GET ['here here']来变量检查它是否为空时,哪个更好
if (isset($_GET['url']) != '') {
//do stuff with it
}
Run Code Online (Sandbox Code Playgroud)
要么
if (isset($_GET['url']) != NULL) {
//do stuff with it
}
Run Code Online (Sandbox Code Playgroud)
''或null或其他什么?
请不要将此称为优化或微优化,我只是在寻找最佳实践,谢谢