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