-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
51 lines (32 loc) · 856 Bytes
/
functions.php
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
<?php
// php function..
function task(){
return "This is task to do add two numbers";
}
// $task = task();
// print_r($task);
$number = 10;
function add(int $number_1){
return $number+$number_1;
}
// $sum = add(5,10);
// print_r(add(10));
function greet(string $name = 'Harry'){
return "Hey, $name I am greet function";
}
// print_r(greet('Deepak'));
// built in functions
// print_r, is_array, strlen, is_null, gettype, date
// print_r() ... data user interface pr print show krata hai
// is_array it validates the given is array or not..
// true or false
$data = "String...";
$number_list = [1,23,4234,123123,352345];
$validate = is_array($number_list);
$null = NULL;
$len = strlen($data);
$check = is_null($number_list);
$type = gettype($check);
$cutrrent_date_time = date("Y-m-d H:i:s");
print_r($cutrrent_date_time);
?>