Typically, execution of the script produces text which will be returned to the web server. The web server will then return the text to your web browser. You have a dynamic web page. Scripts are executable statements.
Full programs are declarations of classes, objects and global functions.
Variables do not need to have their type declared. Variables can hold values of different types. There is a special type called array. There is a special type called table that is an associative table. Function arguments can be different types, dynamically, at runtime.