Skip to content

Here is the top 100 PHP functions: it is the list of the most often used PHP native functions. If you are a PHP developer, you must know the Top 100 PHP Functions deeply.

License

NotificationsYou must be signed in to change notification settings

BaseMax/TopPHPFunctions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Top PHP Functions

If you are a PHP developer, you must know the Top 100 PHP Functions deeply.

The 100 PHP functions that you have to know (2022)

Here is the top 100 PHP functions: it is the list of the most often used PHP native functions.

Why this repository? As a lead developer in the team, I am teaching the functions to my team members deeply.

Where is the Data?

The functions are named, and ranked from 1 to 100. The other 4500 functions are not ranked here.

The frequency column represents how often this function is used across PHP code repositories: the reference corpus is a list of 2500 PHP Open Source projects (top 1000 composer, /gitlab/gitee public repo, downloaded archives…).

PHP Functions

RankFunctionFrequencyAverage
1file_exists62.80%13
2str_replace58.20%33
3implode57.31%35
4count56.42%61
5dirname56.38%13
6substr55.84%53
7sprintf55.26%80
8strpos55.07%24
9array_merge54.80%35
10in_array51.39%33
11explode51.35%26
12strlen50.97%35
13is_array50.73%46
14array_key_exists49.54%28
15array_keys49.27%16
16preg_match46.52%28
17file_get_contents46.48%8
18is_file44.43%6
19array_values42.81%7
20file_put_contents42.46%4
21trim41.57%25
22method_exists41.49%8
23defined40.87%19
24is_string40.76%20
25function_exists40.29%20
26array_map39.33%12
27preg_replace39.02%17
28strtolower38.94%19
29is_dir38.67%6
30strtr38.01%5
31call_user_func37.01%4
32strrpos36.70%4
33call_user_func_array36.43%3
34array_flip35.89%2
35fwrite35.89%4
36rtrim35.69%6
37filter_var35.65%2
38ini_get35.15%5
39json_decode34.76%7
40array_filter34.76%7
41realpath34.15%4
42header34.07%7
43class_exists34.03%12
44json_encode33.49%9
45trigger_error32.95%5
46get_class32.95%13
47spl_autoload_register32.10%1
48unlink30.43%5
49headers_sent29.78%1
50is_object29.31%11
51mkdir29.20%2
52array_shift28.69%6
53spl_autoload_unregister28.54%1
54apcu_fetch28.23%0
55array_pop28.11%5
56stream_resolve_include_path27.84%0
57is_int27.65%5
58apcu_add27.57%0
59getcwd27.49%1
60strtoupper27.42%6
61is_numeric26.95%9
62array_unique26.91%4
63ltrim26.60%4
64basename26.57%4
65str_repeat26.26%7
66fopen25.91%6
67array_slice24.94%3
68getenv24.94%4
69var_export24.71%3
70preg_match_all24.67%3
71is_callable24.48%4
72reset24.44%4
73preg_split24.40%3
74fclose24.36%5
75array_unshift24.25%3
76gettype24.21%4
77end23.90%3
78array_search23.82%3
79max23.78%5
80extension_loaded23.59%3
81is_bool23.55%2
82version_compare22.82%3
83preg_quote22.78%3
84time22.70%9
85ucfirst22.66%4
86ksort22.66%2
87preg_replace_callback22.54%3
88md522.51%4
89array_reverse22.47%2
90array_diff22.12%2
91is_readable22.00%1
92microtime21.96%4
93copy21.81%1
94parse_url21.81%2
95is_null21.50%17
96base64_encode21.42%3
97current21.38%2
98is_resource21.08%3
99serialize20.77%4
100key20.57%2

Source: https://www.exakat.io/en/the-100-php-functions/

About

Here is the top 100 PHP functions: it is the list of the most often used PHP native functions. If you are a PHP developer, you must know the Top 100 PHP Functions deeply.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages