34432 - 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 34432.php

  1. <?php
  2. $arr=['a', 'b', 'c'];
  3. var_dump($arr)
  4. ?>
  5. <br /><br />
  6. <?php
  7. $arr=['a', 'b', 'c'];
  8. echo $arr[0], $arr[1], $arr[2]
  9. ?>
  10. <br /><br />
  11. <?php
  12. $arr=['a', 'b', 'c', 'd'];
  13. echo $arr[0],'+', $arr[1], ' ', $arr[2],'+', $arr[3] 
  14. ?>
  15. <br /><br />
  16. <?php
  17. $arr=['2', '5', '3', '9'];
  18. $result=$arr[0]*$arr[1];
  19. $result1=$arr[2]*$arr[3];
  20. echo $result, ' ', $result1
  21. ?>
  22. <br /><br />
  23. <?php
  24. $arr[]= 1;
  25. $arr[]= 2;
  26. $arr[]= 3;
  27. $arr[]= 4;
  28. $arr[]= 5;
  29. ?>
  30. <br /><br />
  31. <?php
  32. $arr = ['a'=>1, 'b'=>2, 'c'=>3];
  33. echo $arr['c']
  34. ?>
  35.  
File Description
  • 34432
  • PHP Code
  • 05 Apr-2021
  • 499 Bytes
You can Share it: