15,076
edits
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Print type of the variable | Print the type of the variable or just print the variable | ||
== Print the type of the variable == | |||
PHP gettype()<ref>[http://php.net/manual/en/function.gettype.php PHP: gettype - Manual]</ref>: | PHP gettype()<ref>[http://php.net/manual/en/function.gettype.php PHP: gettype - Manual]</ref>: | ||
<pre> | <pre> | ||
| Line 32: | Line 33: | ||
R: [https://stat.ethz.ch/R-manual/R-devel/library/base/html/typeof.html typeof()] | R: [https://stat.ethz.ch/R-manual/R-devel/library/base/html/typeof.html typeof()] | ||
== Print the variable == | |||
PHP | |||
* [http://php.net/manual/en/function.print-r.php PHP: print_r - Manual] or | |||
* [http://php.net/manual/en/function.var-dump.php PHP: var_dump - Manual] | |||
<pre> | |||
# define the variable | |||
$var = 3.14159; | |||
echo print_r($var, true) . PHP_EOL; | |||
var_dump($var); | |||
</pre> | |||
Python | |||
* [https://www.python-course.eu/python3_print.php Python3 Tutorial: Output with Print] | |||
* [https://stackoverflow.com/questions/1987694/how-to-print-the-full-numpy-array python - How to print the full NumPy array? - Stack Overflow] | |||
<pre> | |||
# define the variable | |||
var = 3.14159 | |||
print(var)) # python v. 3 | |||
</pre> | |||
== References == | == References == | ||