IPv4 and IPv6 query

How can I query my current AAAA-record ?

In PHP
gethostbyname(‘example.dynv6.net’) only gives me the IPv4 address

Is there an API that shows me my current AAAA-record?