SFHub Variable Types as Dynamic
A Variable has a dynamic type. Meaning, the same variable can hold different data types, one at time.
Example:
$var = 10
$var = 'my_string'
The $var variable will be reassigned each time. Initially, it will hold 10 as a number and then later, 'my_string' as a string.
It is important to note that the data types: List, Dictionary, Table and Table Row do not allow inconsistent contents. For example, a list of numbers can contain only numbers, as well as a column of a table defined as a string can contain only strings.
Data type Undefined
In SFHub, a variable never assigned or assigned with a bad value, has no value and its data type is Undefined.
Data type Empty
An Empty variable has nothing to do with an Undefined variable; it's a variable whose value is empty. Empty variables can only be of one of the following data type:
String -- empty value is assigned
List -- the list is empty but data type is assigned
Dictionary -- the dictionary is empty but data type is assigned
Table -- the table is configured but empty rows
Table row -- the row is configured but empty values