WPM
100
CPM
100
Errors
0
Time
15Min
Accuracy
100%
Start PHP code typing Practice. Get many PHP codes for addition, php functions, variable, constant and file system in php typing practice.Click on the area below to start typing.

S.No.Paragraph : Practice repeatedly whatever you would like most for full fifteen minutes Lessionsclick to Practice
1Typing Kick learn!"; echo "Hello world!
"; print "

Typing Kick Print!

"; print "Hello Jobedu
"; $txt1 = "Learn On Typing Kick"; $txt2 = "http://typingkick.jobeu.in"; echo "$text1"; $a = array ('a' => 'apple', 'b' => 'banana', 'c ' => array ('x', 'y', 'z')); print_r ($a);//use print always array ?>
1.1 echo and print statement in php
2$var1 = 15; $var2 = 30; $sum = $var1+$var2; // "\n" for new line echo $sum, "\n"; $sum1 = $var1 + $var2; echo $sum1; $d = date("D"); if ($d == "Fri") echo "Have a nice weekend!"; else echo "Have a nice day!";1.2 PHP code illustrating addition
3//php variables $int_var = 12345; $another_int = -12345 + 12345; $many = 2.28; $many_2 = 2.21; $few = $many + $many_2; $true_str = "Tried and true" $true_array[49] = "An array element"; $false_array = array(); $false_null = NULL;1.3 variables in php
4define("ONE", "first thing"); define("TWO2", "second thing"); define("THREE_3", "third thing"); define("__THREE__", "third value"); // Invalid constant names define("2TWO", "second thing"); efine("MINSIZE", 50); echo MINSIZE; echo constant("MINSIZE"); // same thing as the previous line1.4 constants in php
5// function to demonstrate static variables function static_var(){ // static variable static $num = 5; $sum = 2; $sum++; $num++; echo $num, "\n"; echo $sum, "\n"; } // first function call static_var(); // second function call static_var();1.5 function to demonstrate static variables
6file_get_contents( string $filename, bool $use_include_path = false, ?resource $context = null, int $offset = 0, ?int $length = null ): string|false1.1 php file get contents
7array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n". "Cookie: foo=bar\r\n")); $context = stream_context_create($opts); // Open the file using the HTTP headers $file =file_get_contents ('http://www.example.com/', false, $context); ?>1.1 array in php creating stream
8"; } fclose($myfile); ?>1.2 file open in php
91.2 file open in php to end of file
101.3 fread in php
111.3 fopen fgets in php