First, thank for your reply. But sorry but I’m not convinced. It’s a bit small for a explanation. Maybe a PHP example with a volatile object can help me to understand.
I double checked the PHP documentation, and PHP doesn’t seem to have either a keyword or class named “volatile”. I’ll bet you’re using some third-party library, and that library defined its own class called “Volatile”. And then somewhere, you tried to treat an instance of that class like a string (maybe you tried to concatenate it or something), but presumably the Volatile class didn’t define a __toString() method, and so PHP complains that object of class Volatile could not be converted to string.
EDIT: It’s not obvious to me whether you’re trying to fix your error, or whether the error is merely what got you curious about volatile. But in case it’s the latter…
PHP doesn’t have that keyword or class, so if the question is what is volatile in PHP, then the answer is… nothing. But if you’re curious what volatile typically means in other languages, then Dave’s answer was right, and you can probably find longer explanations on wikipedia.
I’ve just make a global search with phpstom in my project. I didn’t defined any class called Volatile. But it’s probably a class of the pthreads php extension.
If you make a search in this changelog you can see something with volatile.
The error was easily fixed. But that not the interesting content.