> > But how would this work for serializing resources, which is part of mixed? >
https://3v4l.org/n9D2S The point is that many internal functions accept all types (including resources), even though they might not do much useful with some of them. Besides the functions that Benjamin mentioned, I'd add the *printf family that accept "mixed" parameters to the list. Seems to me exactly this case would benefit from a, albeit long though > more accurate, actual union type. Regarding accuracy, I believe the more types you have in an union type, the less important exact accuracy is, at least for return types and properties. For example if a function has a return type of mixed, I don't consider it a big deal if the implementation doesn't actually return 1 type (e.g. resource, null) in practice. Máté