practice2 - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of practice2.php

  1. <html>
  2. <body>   
  3.  
  4. <?php 
  5. $str="My name is KHAN";  
  6. $str5="my name is Sonoo jaiswal";  
  7. $str=strtolower($str);  
  8. $str2=strtoupper($str);  
  9. $str3=ucfirst($str);  
  10. $str4=lcfirst($str);  
  11. $str6=ucwords($str5);  
  12. $str7=strrev($str5);  
  13. $str8=strlen($str5); 
  14.   
  15. echo “strtolower: ”.$str.<br>;  
  16. echo “strtoupper: ”.$str2.<br>;  
  17. echo “ucfirst: ”.$str3.<br>;  
  18. echo “lcfirst: ”.$str4.<br>;
  19. echo “ucwords: ”.$str6.<br>;
  20. echo “strrev: ”.$str7.<br>;
  21. echo “strlen: ”.$str8.<br>;
  22.  ?>
  23.  
  24. <html>
File Description
  • practice2
  • PHP Code
  • 18 Apr-2022
  • 549 Bytes
You can Share it: