I'm aware that AMFPHP has long been used to connect php with flex. I remember I read somewhere that there's something better now, but I didn't take a note of it, and of course now I forgot. Does anyone know what that could be?
I'm not sure if there's anything better. You might be interested in Zend Framework's AMF component, which was contributed by Adobe.
You're looking for ZendAMF. Wade Arnold is the guy who developed AMFPHP and he basically discontinued that project in order to develop AMFPHP, which is an officially supported implementation that does more or less the same thing.
ZendAMF does tend to require a bit more setup on the server-side - you need to install Zend, at least partially, and you need to have a decent understanding of file structure etc. The payoff is that you can do things like Dynamic Typing, which allows you to return Typed objects from PHP into AS3 - as long as you have the type defined on both ends and linked together.
It's a cool bit of technology!