The actual (on the disk) php file must have .php extension. This is required for it to be properly executed.
However, that doesn't mean that you have to use the file's filename in order to access it over the web. In Apache2 server, this is done using mod_rewrite. Read about it here.
Example (taken from article):
http://example.com/user.php?id=AHHHHHH
http://example.com/user/AHHHHHH
Same way you can use it to "hide" dynamic_svg.php
and make the url dynamic.svg
P.S. I used Apache2 as example, because it's the most popular server. Other web servers (nginx, IIS) have their own way of accomplishing this