blob: 36febf6e953ac92e94d6979a05c68a02e1178592 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<?php
/*
* globals.php
* @author Jasper van Eck<jasper.vaneck@copernica.com>
*
* An example file to show the working of a void function call.
*/
// we first need to set a number of globals
$b = 10;
$d = function($a,$b,$c) {
return $a+$b+$c;
};
// call the C++ function that will do something
$d = process_globals();
// the global variable $a should not have the value 1
echo("a = $a\n");
// the variable $b should not be 11
echo("b = $b\n");
// $c should be an array
echo("c['member'] = ".$c['member']."\n");
// $d is overwritten and now is 6
echo("d = $d\n");
|