Can a php page edit itself?



I have a simple php page that stores and returns a few static variables...

<? #!/usr/local/bin/php
echo "$variable1, $variable2, $variable3";

I need to update those variables from time to time, but I don't want two files to handle this one thing (one to store variables and one to update the storage file). Can I add the update code to the original file? In other words, can a php page open and edit itself?

I know that this would be easy to try, but I'm scared that I might cause problems with the server if this doesn't work.

Thank you for your time and attention.