summaryrefslogtreecommitdiff
path: root/Examples/php/enum/runme.php
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2009-08-18 20:56:02 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-09-25 16:59:08 +0000
commit9f8a09ed743cedd9547bf0661d518647966ab114 (patch)
tree9c7803d3b27a8ec22e91792ac7f7932efa128b20 /Examples/php/enum/runme.php
downloadswig-tarball-master.tar.gz
Imported from /srv/lorry/lorry-area/swig-tarball/swig-1.3.40.tar.gz.HEADswig-1.3.40master
Diffstat (limited to 'Examples/php/enum/runme.php')
-rw-r--r--Examples/php/enum/runme.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/Examples/php/enum/runme.php b/Examples/php/enum/runme.php
new file mode 100644
index 0000000..55b0bc4
--- /dev/null
+++ b/Examples/php/enum/runme.php
@@ -0,0 +1,32 @@
+<?php
+
+require "example.php";
+
+# ----- Object creation -----
+
+# Print out the value of some enums
+print "*** color ***";
+print " RED =" . RED;
+print " BLUE =" . BLUE;
+print " GREEN =" . GREEN;
+
+print "\n*** Foo::speed ***";
+print " Foo_IMPULSE =" . Foo_IMPULSE;
+print " Foo_WARP =" . Foo_WARP;
+print " Foo_LUDICROUS =" . Foo_LUDICROUS;
+
+print "\nTesting use of enums with functions\n";
+
+enum_test(RED, Foo_IMPULSE);
+enum_test(BLUE, Foo_WARP);
+enum_test(GREEN, Foo_LUDICROUS);
+enum_test(1234,5678);
+
+print "\nTesting use of enum with class method\n";
+$f = new_Foo();
+
+Foo_enum_test($f,Foo_IMPULSE);
+Foo_enum_test($f,Foo_WARP);
+Foo_enum_test($f,Foo_LUDICROUS);
+
+?>