This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list.
It used to be hard to find questions about operators and other syntax tokens.¹
The main idea is to have links to existing questions on Stack Overflow, so it's easier for us to reference them, not to copy over content from …
我见过@某些功能的使用,如下所示:
$fileHandle = @fopen($fileName, $writeAttributes);
Run Code Online (Sandbox Code Playgroud)
这个符号有什么用?
php echo以"@"符号开头显示变量,
例:
<?php echo @$user_profile['id'];?>
Run Code Online (Sandbox Code Playgroud)
为什么在这里使用@符号?