summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2015-03-16 14:38:08 +1300
committerOlly Betts <olly@survex.com>2015-03-16 14:38:08 +1300
commit657f9bdd9c61b46b3cd9465c68c79f8e77d4ab81 (patch)
tree76bd16693fd54c1caf2b7aaea5e68196177c7d0c
parenta9f0d0fb4e54f18b2808407219234b9ee0f37fd9 (diff)
downloadswig-657f9bdd9c61b46b3cd9465c68c79f8e77d4ab81.tar.gz
Remove two long dead files
Resurrected by a previous merge.
-rw-r--r--Examples/php/reference/runme-proxy.php479
-rw-r--r--Examples/php/variables/runme.php4.old80
2 files changed, 0 insertions, 159 deletions
diff --git a/Examples/php/reference/runme-proxy.php4 b/Examples/php/reference/runme-proxy.php4
deleted file mode 100644
index 9d216f78b..000000000
--- a/Examples/php/reference/runme-proxy.php4
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-
-# This file illustrates the manipulation of C++ references in Php.
-# This uses the low-level interface. Proxy classes work differently.
-
-require "example.php";
-
-# ----- Object creation -----
-
-print "Creating some objects:\n";
-$a = new Vector(3,4,5);
-$b = new Vector(10,11,12);
-
-print " Created a: $a " . $a->print() . "\n";
-print " Created b: $b " . $b->print() . "\n";
-
-# ----- Call an overloaded operator -----
-
-# This calls the wrapper we placed around
-#
-# operator+(const Vector &a, const Vector &)
-#
-# It returns a new allocated object.
-
-print "Adding a+b\n";
-$c = addv($a,$b);
-print " a+b =". $c->print()."\n";
-
-# Note: Unless we free the result, a memory leak will occur
-$c = 0;
-
-# ----- Create a vector array -----
-
-# Note: Using the high-level interface here
-print "Creating an array of vectors\n";
-$va = new VectorArray(10);
-
-print " va: $va size=".$va->size()."\n";
-
-# ----- Set some values in the array -----
-
-# These operators copy the value of $a and $b to the vector array
-$va->set(0,$a);
-$va->set(1,$b);
-
-$va->get(0);
-# This will work, but it will cause a memory leak!
-
-$va->set(2,addv($a,$b));
-
-# The non-leaky way to do it
-
-$c = addv($a,$b);
-$va->set(3,$c);
-$c = NULL;
-
-# Get some values from the array
-
-print "Getting some array values\n";
-for ($i = 0; $i < 5; $i++) {
-print "do $i\n";
- $v = $va->get($i);
- print " va($i) = ". $v->print(). "\n";
-}
-
-# Watch under resource meter to check on this
-#print "Making sure we don't leak memory.\n";
-#for ($i = 0; $i < 1000000; $i++) {
-# $c = VectorArray_get($va,$i % 10);
-#}
-
-# ----- Clean up -----
-print "Cleaning up\n";
-# wants fixing FIXME
-#delete_VectorArray($va);
-#delete_Vector($a);
-#delete_Vector($b);
-
-?>
diff --git a/Examples/php/variables/runme.php4.old b/Examples/php/variables/runme.php4.old
deleted file mode 100644
index 9a6bfb386..000000000
--- a/Examples/php/variables/runme.php4.old
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-### THIS VERSION was written for when php global vars fakingly mirrored
-### the wrapped global vars, but it was very inefficient.
-### For now we don't do this (pending some changes to php itself) so
-### we use accessor functions instead; WE KEEP THIS version around ready
-### for when those php changes are made and we can switch back.
-### Specifically we want $_GLOBALS variable overloading like object
-### property overloading
-
- require "example.php";
-
- /* Try to set the values of some global variables */
-
- $ivar = 42;
- $svar = -31000;
- $lvar = 65537;
- $uivar = 123456;
- $usvar = 61000;
- $ulvar = 654321;
- $scvar = -13;
- $ucvar = 251;
- $cvar = "S";
- $fvar = 3.14159;
- $dvar = 2.1828;
- $strvar = "Hello World";
- $cstrvar = "Goodbye";
- $iptrvar = new_int(37);
- $ptptr = new_point(37,42);
- $name = "Bill";
-
- echo "Variables (values printed from PHP)\n";
-
- echo "ivar = $ivar\n";
- echo "svar = $svar\n";
- echo "lvar = $lvar\n";
- echo "uivar = $uivar\n";
- echo "usvar = $usvar\n";
- echo "ulvar = $ulvar\n";
- echo "scvar = $scvar\n";
- echo "ucvar = $ucvar\n";
- echo "cvar = $cvar\n";
- echo "fvar = $fvar\n";
- echo "dvar = $dvar\n";
- echo "strvar = $strvar\n";
- echo "cstrvar = $cstrvar\n";
- echo "iptrvar = $iptrvar\n";
- echo "name = $name\n";
- echo "ptptr = $ptptr" , point_print($ptptr) , "\n";
- echo "pt = $pt" , point_print($pt) , "\n";
-
- echo "\nVariables (values printed from C)\n";
-
- print_vars();
-
- echo "\nI'm going to try and update a structure variable.\n";
-
- $pt = $ptptr;
-
- echo "The new value is \n";
-
- pt_print();
-
- echo "You should see the value", point_print($ptptr), "\n";
-
- echo "\nNow I'm going to try and modify some read only variables\n";
-
- echo "Trying to set 'path'\n";
-
- /* Sadly this works */
- $path = "Whoa!";
- echo "Path = $path\n";
-
- echo "Trying to set 'status'\n";
-
- /* And this */
- $status = 0;
- echo "Status = $status\n";
-
-?>
-