What do you mean with "everything stop to work"? If you change the standard index.php of XAMPP the XAMPP Pages won't work anymore, that makes sense. If you just want to try a little bit, create a folder inside the htdocs folder. For example, if you installed XAMPP to C:\xampp then create a folder named test inside C:\xampp\htdocs, then it should look like this:
C:\xampp\htdocs\test
Inside the test folder you create your own index.php with your own Code. When you call
http://localhost/test/ in your Browser, your index.php file will be parsed by PHP.
glitzi