Remove runtime warnings in overloading php example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e7e542ffc9
commit
a0b869da38
1 changed files with 3 additions and 4 deletions
|
|
@ -35,11 +35,10 @@ print " Square = (" . $s->x . "," . $s->y . ")\n";
|
|||
|
||||
# ----- Call some methods -----
|
||||
|
||||
print "\nHere are some properties of the shapes:\n";
|
||||
print "\nCall some overloaded methods:\n";
|
||||
foreach (array(1, 2.1, "quick brown fox", $c, $s) as $o) {
|
||||
print " ".get_class($o)." \$o\n";
|
||||
print " overloaded = " . overloaded($o) . "\n";
|
||||
}
|
||||
print " overloaded = " . overloaded($o) . "\n";
|
||||
}
|
||||
|
||||
# Need to unset($o) or else we hang on to a reference to the Square object.
|
||||
unset($o);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue