Apparently all the major popular browsers support the APNG format (https://caniuse.com/?search=apng).
PHP graphics functions (imagecreatefrom… and image…) don’t include specific functions for the APNG format. However, APNG is designed to masquerade as PNG.
So, the question is whether it’s ok to use the PNG functions with APNG files.
If I google it I find the APNG File Format. Here it says:
So you can use the PHP PNG functions with APNG files but they will only operate on the first frame of the animation.
To use all of the frames in an animated PNG file, I would suggest to to use one of the ImageMagick extensions.