My text strings behaves very strange when printing them. They all come from parsing a website with help of DOMDocuments. I have used DOMNode::nodeValue to get the parsed texts.
Most of my string is not printable with printf. Instead I get a warningmessage "Warning: printf(): Too few arguments ".
I’ve tried to use var_dump on the strings and they all contain string characters. Some are recognized by var_dump as strings, but they are not printable either. Should say that I’m rather guessing that var_dump recognizes them as strings since string(length of string) is printed before the dumped characters.
Is there some sort of characters that could cause this behaviour that causes my strings to be interpreted as something else?
If your string has something like
%d, it expects a parameter to replace that with. For example: (taken from the php docs)Try printing it with
echoinstead.