I know that php is a scripting language. But some of php codes/docs, like when i tried to use magic methods, still use the "script" word. Like the __invoke()
method that is called when "a script tries to call an object as a function". Here, in "script tries" - what exactly does "script" here refer to?
A script is a pretty vague term, generally, a script is a group of code that preforms in and around a root goal, like a script to generate a json file that has some input parameters which slightly modify the final output.
In PHP, you might have one main script in your project, or you may have many fragments - there is not hard line that says what is a script.
You may even call other scripts from yours; voting to close as opinion based.