begin - 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.
Result of php executing
Full code of begin.php
- <?php
- /* //Echo command
- $my_user = "Claire";
- echo "Hello World ".$my_user."\n";
- //php is not strictly type
- $my_tel = 7739673036;
- $my_float = 0.2;
- $my_string = "My details";
- $my_tel = "7739673036";
- $result = $my_tel . $my_float;
- echo " $result \n ";
- */
- /* //Numbers commands and IF
- $numx = 3400;
- $numy = 2200;
- $result = $numx-$numy;
- $result = $result - 745;
- echo "my calculation: $result \n ";
- if($result < 800) {
- echo "my calculations: $result \n";
- }
- */
- /* // More IF
- $today = "Sunday";
- if($today==='Saturday' || $today=="Sunday"){
- echo "it is the weekend";
- } else {
- echo "it is not the weekend, but $today \n";
- }
- */
- //ARRAY
- $week = ["MON", "TUES", "WED", "THUR", "FRI"];
- //print_r($week);
- // PUSH
- $week[] = "SAT";
- array_push($week, "SUN");
- $week[] = "DEAD";
- //print_r($week);
- foreach($week as $val){
- //iteration
- }
File Description
- begin
- PHP Code
- 23 Sep-2022
- 861 Bytes
You can Share it:
Latest PHP Pastes