A few php Phar questions -
a few questions i'm sure answers useful many getting grips relatively new phar.
is possible delete or edit file inside phar script, within phar script, when it's running?
i've noticed can change name of phar file examplename.phar examplename.php , run in url , still works fine. right? ok do? safe?
is better practice put files in same directory , phar it, or ok keep folders , sub folders , phar - or not matter?
can obfuscate phar file. or ruin it? obfuscating have done before pharing?
hopefully phar expert can answer these. thanks
the usual setting of php treat phar files readonly. in fact, have change setting allow local copy of php create these files. doubt can changed, wouldn't bet on it.
the general structure of phar initial php script part sets things up, , call
__halt_compiler()
followed zipped bytes (after transferring control script part inside phar), can whatever possible php script without phar, including changing it's name. note bootstrap code of existing phar files might not allow because of hardcoded filenames, not general case.it not matter.
obfuscation on code level leave php code in runnable condition pure php won't affect phar. expects php contain special extensions fail.