blob: 31dded64c7639aabcc6a71144646425093314e7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<h2>Working with variables</h2>
<p>
Variables in PHP are non-typed. A variable can thus hold any possible type:
an integer, string, a floating point number, and even an object or an array.
C++ on the other hand is a typed language. In C++ an integer variable always
has a numeric value, and a string variable always hold a string value.
</p>
<p>
When you mix native code and PHP code, you will need to convert the non-typed
PHP variables into native variables, and the other way round: convert native
variables back into non-typed PHP variables. The PHP-CPP library offers the
"Value" class that makes this a very simple task.
</p>
|