-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.php
More file actions
64 lines (55 loc) · 1.26 KB
/
function.php
File metadata and controls
64 lines (55 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$string = "Hello World";
echo strlen($string);
echo "<br>";
echo strpos($string , "r");
echo "<br>";
echo strpos($string , "Wo");
echo "<br>";
echo str_replace("World","PHP",$string);
echo "<br>";
echo strtoupper($string);
echo strtolower($string);
echo "<br>";
echo substr($string,2,10);
echo "<br>";
print_r( explode(" ",$string) );
echo "<br>";
$number = -5.5;
echo abs($number);
echo "<br>";
echo round($number);
echo "<br>";
echo pow(2,3);
echo "<br>";
echo sqrt(169);
echo "<br>";
echo rand(1,100);
echo "<br>";
$array1 = ['apple','mango','banana','leechi'];
$array2 = ['greenapple'];
echo count($array1);
echo "<br>";
echo is_array($array1);
echo "<br>";
echo array_push($array1,"kiwi");
echo "<br>";
echo array_pop($array1);
echo "<br>";
print_r(array_reverse($array1));
echo "<br>";
print_r(array_merge($array1,$array2));
echo "<br>";
echo date ("Y-m-d H:i:s");
echo time();
?>
</body>
</html>