fork download
  1. <?php
  2. // example code
  3. $var1 = "Hello";
  4. $var2 = "hello";
  5.  
  6. $one = (strcasecmp($var1, $var2) == 0);
  7.  
  8. if ($one) {
  9. echo "example 1: worked, it's the same.";
  10. } else {
  11. echo "example 1: nope, not the same";
  12. }
  13.  
  14. echo "\n";
  15.  
  16.  
  17. $var3 = "Hello";
  18. $var4 = "hello2";
  19.  
  20.  
  21. $two = (strcasecmp($var3, $var4) == 0);
  22.  
  23. if ($two) {
  24. echo "example 2: worked, it's the same.";
  25. } else {
  26. echo "example 2: nope, not the same";
  27. }
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
example 1: worked, it's the same.
example 2: nope, not the same