What is @ in an object?

I have the following object:

[Suppliers] => stdClass Object ( [@size] => 1 [name] => Supplier Name [Supplier] => stdClass Object ( [@chainCode] => EP [@id] => 13 ) ) 

I know how to get the name property and display it, but I don’t know how to get properties starting with the @ sign ... What is it and how can I get its value?

+6
source share
1 answer

These are just properties with a somewhat unusual name. You can get them as follows:

 $object->{'@id'}; 
+13
source

Source: https://habr.com/ru/post/907025/


All Articles