It's not possible to find strings containing double quotes using this function.
For example, if you got a message named : Hello, this is "Bob"
You can try :
imap_search($inbox, 'SUBJECT "Hello, this is "Bob""')
Or
imap_search($inbox, "SUBJECT 'Hello, this is \"Bob\"'")
But both are false, because you did not escape double quotes in the first case, and you can NOT use simple quotes in the imap_search criteria in the second case.
The real problem is that you cannot use simple quotes to surround your criteria in the 2nd argument of imap_search, after SUBJECT.