The variables in the Variables tab of an exercise are written in PHP (see this article). This means we sometimes need to use PHP functions in a variable definition. Not all PHP functions are allowed. For a list of all allowed PHP functions, including a link to the PHP manual, see the authoring manual.

There are also some PHP functions made by SOWISO, mostly focused on making mathematical operations easier. A list of SOWISO-made PHP functions and their specifications can be found in the authoring manual.

PHP is very limited if it comes to advanced mathematical calculations. For example, it is not easy to do differentiation using just PHP. If we want to do differentiation or another advanced mathematical operation in the variables, we need another programming language. At this moment, the languages Python, Maxima, and R are supported. Click here to learn how to define variables using Maxima and here define variables using Python. For now, there is no article explaining how to define variables using R, but some information is provided in the authoring manual under โsw_R(a)โ.