PageRenderTime 48ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. <?php
  2. require "example.php";
  3. # ----- Object creation -----
  4. # Print out the value of some enums
  5. print "*** color ***";
  6. print " RED =" . RED;
  7. print " BLUE =" . BLUE;
  8. print " GREEN =" . GREEN;
  9. print "\n*** Foo::speed ***";
  10. print " Foo_IMPULSE =" . Foo_IMPULSE;
  11. print " Foo_WARP =" . Foo_WARP;
  12. print " Foo_LUDICROUS =" . Foo_LUDICROUS;
  13. print "\nTesting use of enums with functions\n";
  14. enum_test(RED, Foo_IMPULSE);
  15. enum_test(BLUE, Foo_WARP);
  16. enum_test(GREEN, Foo_LUDICROUS);
  17. enum_test(1234,5678);
  18. print "\nTesting use of enum with class method\n";
  19. $f = new_Foo();
  20. Foo_enum_test($f,Foo_IMPULSE);
  21. Foo_enum_test($f,Foo_WARP);
  22. Foo_enum_test($f,Foo_LUDICROUS);
  23. ?>