import source from 1.3.40
[external/swig.git] / Examples / php / enum / runme.php
1 <?php
2
3 require "example.php";
4
5 # ----- Object creation -----
6
7 # Print out the value of some enums
8 print "*** color ***";
9 print "    RED    =" . RED;
10 print "    BLUE   =" . BLUE;
11 print "    GREEN  =" . GREEN;
12
13 print "\n*** Foo::speed ***";
14 print "    Foo_IMPULSE   =" . Foo_IMPULSE;
15 print "    Foo_WARP      =" . Foo_WARP;
16 print "    Foo_LUDICROUS =" . Foo_LUDICROUS;
17
18 print "\nTesting use of enums with functions\n";
19
20 enum_test(RED, Foo_IMPULSE);
21 enum_test(BLUE, Foo_WARP);
22 enum_test(GREEN, Foo_LUDICROUS);
23 enum_test(1234,5678);
24
25 print "\nTesting use of enum with class method\n";
26 $f = new_Foo();
27
28 Foo_enum_test($f,Foo_IMPULSE);
29 Foo_enum_test($f,Foo_WARP);
30 Foo_enum_test($f,Foo_LUDICROUS);
31
32 ?>