/tags/rel-1-3-29/SWIG/Examples/php4/enum/runme.php4
PHP | 32 lines | 21 code | 9 blank | 2 comment | 0 complexity | 6fc48f63156444965aa67f89d5d90ffe MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- <?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);
- ?>