[php] check string type in TUnop too (closes #3263)