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

  1.  
  2. <!doctype html>
  3. <html>
  4.     <body>
  5.         <?php
  6.         
  7.         //  define(B, 15);
  8.         //  echo B;
  9.         
  10.           $number = 5;
  11.           $number_2 = 42;
  12.           // echo "Hello: " . $number . $number_2;
  13.           $a = 1;
  14.           $b = "1";
  15.             
  16.           // echo $a + intval($b).'<br>';
  17.           
  18.          $x = 5;
  19.          $y = 6;
  20.          $z = 30;
  21.          
  22.          $x += 10;
  23.          // echo $x.'<br>';
  24.          
  25.          $y -= 3;
  26.          // echo $y.'<br>';
  27.          
  28.          // echo ++$z.'<br>';
  29.          // echo M_PI.'<br>';
  30.          // echo M_E.'<br>';
  31.          
  32.          $rand = mt_rand(1, 20); // mt_rand
  33.          // echo $rand;
  34.          
  35.          $str = "Hello";
  36.          // echo 'var: ' . $str.'<br>';
  37.          
  38.          // echo strtoupper('some').'<br>';
  39.          
  40.          $v = 10;
  41.          
  42.         //  switch($v) {
  43.         //      case 5:
  44.         //          echo "Var: 5";
  45.         //          break;
  46.         //      case 1:
  47.         //          echo "Var: 1";
  48.         //          break;
  49.         //      case 2:
  50.         //          echo "Var: 2";
  51.         //         break;
  52.         //      default:
  53.         //          echo "no";
  54.         //  }
  55.          
  56.          $arr = array(1,2,3,4,5,6,7,8,9);
  57.          $arr[8] = 500;
  58.          // echo $arr[8].'<br>';
  59.          // echo $arr[0];
  60.          
  61.          $foo = [100, 200, 300, 400];
  62.          
  63.         //  foreach ($foo as $elem) {
  64.         //      echo $elem.'<br>';
  65.         //  }
  66.          
  67.          $list = ["age" => 50, "name" => 'Anna', "city" => 'London'];
  68.          echo $list["city"];
  69.          
  70.          $matrix = [
  71.              [1, 3, 4],
  72.              [3, 1000, 6],
  73.              [0, 0, 0]
  74.              ];
  75.           
  76.           // echo $matrix[1][1];
  77.           
  78.         ?>
  79.         
  80.         <form method="post">
  81.             
  82.             <input type="text" >
  83.             <button type="sumbit">Отправить</button>
  84.             
  85.         </form>
  86.         
  87.     </body>
  88. </html>
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
File Description
  • Ariya
  • PHP Code
  • 12 May-2023
  • 2.05 Kb
You can Share it: