相关疑难解决方法(0)

Reference — What does this symbol mean in PHP?

What is this?

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.

Why is this?

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 …

php arguments symbols operators

4314
推荐指数
21
解决办法
63万
查看次数

PHP中的::(双冒号)和 - >(箭头)有什么区别?

在PHP中有两种不同的方法来访问方法,但有什么区别?

$response->setParameter('foo', 'bar');
Run Code Online (Sandbox Code Playgroud)

和

sfConfig::set('foo', 'bar');
Run Code Online (Sandbox Code Playgroud)

我假设->(用大于号或破坏号的破折号)用于变量的函数,而::(双冒号)用于类的函数.正确?

是=>赋值运算符仅用于一个阵列中分配的数据?这与=用于实例化或修改变量的赋值运算符形成对比吗?

php

184
推荐指数
5
解决办法
11万
查看次数

标签 统计

php ×2

arguments ×1

operators ×1

symbols ×1