What does -> mean in PHP
PHP中文网用户-2307495
PHP中文网用户-2307495 2023-08-15 09:57:25
0
2
680

What does -> in PHP mean? I just learned it and don’t understand anything. Please explain it to me. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

PHP中文网用户-2307495
PHP中文网用户-2307495

reply all (1)
WBOY

The arrow symbol "->" is used to access the properties and methods of the object.

It means getting properties or calling methods from an object. For example, suppose there is an object named $obj that has a property named $property and a method named $method.

can be accessed using arrow symbols:

$obj->property; // 访问对象的属性 $obj->method(); // 调用对象的方法

  • reply Can you add WeChat to ask questions about GraphQL? V: dongli3023
    李栋 author 2023-09-05 21:01:50
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!