Works on my phone. Reminds me of phreaking. What other secret codes are there like this? How did you come to learn about this one?
https://en.wikipedia.org/wiki/Unstructured_Supplementary_Ser...
In addition to the already mentioned code of [STAR]3001#12345# there is also [STAR]#06# which will show your IMEI.
There were plenty of others (including spelling out 'WARRANTY' to get the manufacture date of the phone) but I forgot most of them.
Interestingly, on the iPhone, dialling anything of the format [STAR]# ...anything... # will cause the screen to go grey as if a separate app, then after a short delay tell you that your code was invalid.