diff options
Diffstat (limited to 'Examples/php/pointer/runme.php')
-rw-r--r-- | Examples/php/pointer/runme.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Examples/php/pointer/runme.php b/Examples/php/pointer/runme.php index e79b23810..8dc3ab887 100644 --- a/Examples/php/pointer/runme.php +++ b/Examples/php/pointer/runme.php @@ -1,7 +1,5 @@ <?php - require "example.php"; - # First create some objects using the pointer library. print "Testing the pointer library\n"; @@ -14,7 +12,7 @@ print " b = $b\n"; print " c = $c\n"; - # Call the add() function wuth some pointers + # Call the add() function with some pointers add($a,$b,$c); print " $a + $b = $c\n"; @@ -28,8 +26,8 @@ print " 37 - 42 = $r\n"; # Now try the version with multiple return values - # print "Testing multiple return values\n"; - # ($q,$r) = divide(42,37); - # print " 42/37 = $q remainder $r\n"; - -?> + print "Testing multiple return values\n"; + $a = divide(42,37); + $q = $a[0]; + $r = $a[1]; + print " 42/37 = $q remainder $r\n"; |