[Php 4, Php 5, Php 7, Php 8]
function_exists - return true
nếu hàm đã cho đã được xác định — Return true
if the given function has been defined
Sự mô tả
function_exists [chuỗi $function
]: bool[string $function
]: bool
Thông số
function
Tên chức năng, như một chuỗi.
Trả về giá trị
Trả về true
nếu function
tồn tại và là một hàm, false
khác.true
if function
exists and is a function, false
otherwise.
Ghi chú::
Hàm này sẽ trả về
false
cho các cấu trúc, chẳng hạn như bao gồm_once và Echo.false
for constructs, such as include_once and echo.
Ví dụ
Ví dụ #1 function_exists [] Ví dụfunction_exists[] example
Ghi chú
Ghi chú::
Hàm này sẽ trả về
false
cho các cấu trúc, chẳng hạn như bao gồm_once và Echo.
Ví dụ
- Ví dụ #1 function_exists [] Ví dụ
- Ghi chú
- Tên hàm có thể tồn tại ngay cả khi chính hàm không thể sử dụng do cấu hình hoặc biên dịch các tùy chọn [với các hàm hình ảnh là một ví dụ].
- Xem thêm
- Phương thức_Exists [] - Kiểm tra xem phương thức lớp có tồn tại không
is_callable [] - Xác minh rằng một giá trị có thể được gọi là hàm từ phạm vi hiện tại. ¶
GET_DEFINED_FINSTS [] - Trả về một mảng của tất cả các hàm được xác định
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
echo foo[];
function foo[] { return "I am foo"; }
$function
0
$function
1
$function
2
$function
3
$function
4class_exists [] - kiểm tra xem lớp có được xác định không ¶
extense_loaded [] - Tìm hiểu xem một tiện ích mở rộng có được tải không
$function
5
$function
6
$function
7
$function
8
$function
9
function
0Chris tại Candm Dot Org Dot Uk ¶ ¶
1 năm trước
function
1
function
2
function
3
function
4Kitchin ¶ ¶
10 năm trước
function
5
function
6
function
7
function
8
function
9
true
0
true
1
true
2
true
3
true
4
true
5
$function
4Michael tại Squilopople Dot Com ¶ ¶
1 năm trước
true
7
true
8
true
9
function
0Kitchin ¶ ¶
10 năm trước
function
1
function
2
$function
4Michael tại Squilopople Dot Com ¶ ¶
7 năm trước
function
4
function
5
$function
4Ayyappan dot ashok tại gmail dot com ¶ ¶
6 năm trước
function
7
function
8
$function
4Bruceb ¶ ¶
10 năm trước
false
0
false
1
false
2
false
3
$function
4Michael tại Squilopople Dot Com ¶ ¶
7 năm trước
false
5
false
6
false
7
false
8Ayyappan dot ashok tại gmail dot com ¶ ¶
7 năm trước
false
9
false
0
false
1
false
2
false
3
false
4
$function
4Ayyappan dot ashok tại gmail dot com ¶ ¶
6 năm trước
false
6
false
7
false
8
$function
4Bruceb ¶ ¶
Andi tại Splitbrain Dot org ¶
0
1
2
3
$function
416 năm trước ¶
7 năm trước
5
6
7
8
9
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
0
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
1
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
2
$function
4Ayyappan dot ashok tại gmail dot com ¶ ¶
10 năm trước
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
4
true
9
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
6Michael tại Squilopople Dot Com ¶ ¶
extense_loaded [] - Tìm hiểu xem một tiện ích mở rộng có được tải không
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
7
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
8
The confusion expressed in some of the submissions here arise because functions declared outside conditional blocks are defined as the code is loaded and are thus callable and exist wherever in the code they are declared, whereas those declared inside a condition block are not defined until that block is executed. Thus:
9
$function
4Chris tại Candm Dot Org Dot Uk ¶ ¶
1 năm trước
echo foo[];
1
function foo[] { return "I am foo"; }
echo foo[];
2
function foo[] { return "I am foo"; }
echo foo[];
3
function foo[] { return "I am foo"; }
echo foo[];
4
function foo[] { return "I am foo"; }
echo foo[];
5
function foo[] { return "I am foo"; }
echo foo[];
6
function foo[] { return "I am foo"; }
$function
4Kitchin ¶ ¶
7 năm trước
echo foo[];
8
function foo[] { return "I am foo"; }
echo foo[];
9
function foo[] { return "I am foo"; }
$function
00
$function
01
$function
02
$function
03
$function
04
$function
02
$function
06
$function
07
$function
4Ayyappan dot ashok tại gmail dot com ¶ ¶
6 năm trước
$function
09
$function
10
$function
11
$function
12Bruceb ¶ ¶
7 năm trước
$function
13
$function
14
$function
15
$function
16
$function
17
$function
18
$function
4Ayyappan dot ashok tại gmail dot com ¶ ¶
Andi tại Splitbrain Dot org ¶
$function
20
16 năm trước ¶
6 năm trước
$function
21
$function
22
$function
23
$function
24Bruceb ¶ ¶
7 năm trước
$function
25
$function
26
$function
27
$function
28
$function
29
$function
07
$function
31
$function
4