/trunk/Examples/php/simple/runme.php

# · PHP · 25 lines · 11 code · 8 blank · 6 comment · 0 complexity · e55c820f57f7c05c9b42953b9bdbb51f MD5 · raw file

  1. <?php
  2. require "example.php";
  3. # Call our gcd() function
  4. $x = "42 aaa";
  5. $y = 105;
  6. $g = gcd($x,$y);
  7. print "The gcd of $x and $y is $g\n";
  8. # Manipulate the Foo global variable
  9. # Output its current value
  10. print "Foo = " . Foo_get() . "\n";
  11. # Change its value
  12. Foo_set(3.1415926);
  13. # See if the change took effect ( this isn't a good example for php, see
  14. # manual for why. )
  15. print "Foo = " . Foo_get() . "\n";
  16. print_Foo();
  17. ?>