1) Technically, yes. PHP and apache do some caching and stuff but each time you refresh the page, the code executes all over again. If you are writing log files or creating database records, it will do that stuff all over again.
On the other hand, if it doesn't create any lasting db or log records, then the class you create should be pretty much the same each time if you call with the same values--unless you are using random functions or something like that. It all depends on your class definition.
2) if index2.php has code that outputs html, then you may or may not want to do this because it will spit out all kind of html, but if your index.php just runs some php code and doesn't output anything then give it a whirl:
include('index2.php');
3) now you're confusing me a bit because I was under the impression that you were creating the class from index2.php in your original index.php file. If you are running index.php, it has no visibility to what goes on in the index2.php unless you include it as i described above (in which case it might also spit out all that html so you get some garbled html) OR unless you store the results of index.php in a file or in a database or something like that.
Separate PHP files run independently of each other. What happens in one is of no consequence in the other unless you take pains to make it have consequence...like including it, writing data to a cookie for the other page to find, storing data in a DB for the other page to query, writing data to a file for the other page to read.
If you have code in index2.php that you want to also run in index1.php, you should move that code to a 3rd file and maybe call it 'shared.php' and then both index.php and index2.php can access it like this:
include('shared.php');
4) the way to do that last thing is to only define the instance of 'StringHandlerClass' inside the function. like this:
// nobody's heard of $my_class at this point
function my_function($arg) {
$my_class = new StringHandlerClass();
// use it while it's hot!
} // my_function()
// $my_class doesn't exist here either...it will only consume memory inside the function