GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BaseMax/TopPHPFunctions: 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.

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
array.php
array.php
 
 
array_diff.php
array_diff.php
 
 
array_filter.php
array_filter.php
 
 
array_flip.php
array_flip.php
 
 
array_key_exists.php
array_key_exists.php
 
 
array_keys.php
array_keys.php
 
 
array_map.php
array_map.php
 
 
array_merge.php
array_merge.php
 
 
array_pop.php
array_pop.php
 
 
array_push.php
array_push.php
 
 
array_reverse.php
array_reverse.php
 
 
array_shift.php
array_shift.php
 
 
array_slice.php
array_slice.php
 
 
array_unique.php
array_unique.php
 
 
array_unshift.php
array_unshift.php
 
 
array_values.php
array_values.php
 
 
asort.php
asort.php
 
 
call_user_func.php
call_user_func.php
 
 
call_user_func_array.php
call_user_func_array.php
 
 
current.php
current.php
 
 
dirname.php
dirname.php
 
 
end.php
end.php
 
 
explode.php
explode.php
 
 
file.txt
file.txt
 
 
file_exists.php
file_exists.php
 
 
file_get_contents.php
file_get_contents.php
 
 
filesize.php
filesize.php
 
 
function.php
function.php
 
 
function_exists.php
function_exists.php
 
 
fwrite.php
fwrite.php
 
 
getcwd.php
getcwd.php
 
 
gettype.php
gettype.php
 
 
headers_sent.php
headers_sent.php
 
 
htmlspecialchars.php
htmlspecialchars.php
 
 
implode.php
implode.php
 
 
in_array.php
in_array.php
 
 
ini_get.php
ini_get.php
 
 
is_bool.php
is_bool.php
 
 
is_dir.php
is_dir.php
 
 
is_int.php
is_int.php
 
 
is_null.php
is_null.php
 
 
is_numeric.php
is_numeric.php
 
 
is_object.php
is_object.php
 
 
is_readable.php
is_readable.php
 
 
is_resource.php
is_resource.php
 
 
is_writeable.php
is_writeable.php
 
 
key.php
key.php
 
 
krsort.php
krsort.php
 
 
ksort.php
ksort.php
 
 
max.php
max.php
 
 
microtime.php
microtime.php
 
 
min.php
min.php
 
 
mkdir.php
mkdir.php
 
 
next.php
next.php
 
 
parse_url.php
parse_url.php
 
 
phpinfo.php
phpinfo.php
 
 
prev.php
prev.php
 
 
realpath.php
realpath.php
 
 
rsort.php
rsort.php
 
 
sort.php
sort.php
 
 
sprintf.php
sprintf.php
 
 
str_repeat.php
str_repeat.php
 
 
str_replace.php
str_replace.php
 
 
stripslashes.php
stripslashes.php
 
 
strpos.php
strpos.php
 
 
strrpos.php
strrpos.php
 
 
strtolower.php
strtolower.php
 
 
strtr.php
strtr.php
 
 
substr.php
substr.php
 
 
time.php
time.php
 
 
trim.php
trim.php
 
 
ucfirst.php
ucfirst.php
 
 
unlink.php
unlink.php
 
 
version_compare.php
version_compare.php
 
 

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, github/gitlab/gitee public repo, downloaded archives…).

PHP Functions

Rank Function Frequency Average
1 file_exists 62.80% 13
2 str_replace 58.20% 33
3 implode 57.31% 35
4 count 56.42% 61
5 dirname 56.38% 13
6 substr 55.84% 53
7 sprintf 55.26% 80
8 strpos 55.07% 24
9 array_merge 54.80% 35
10 in_array 51.39% 33
11 explode 51.35% 26
12 strlen 50.97% 35
13 is_array 50.73% 46
14 array_key_exists 49.54% 28
15 array_keys 49.27% 16
16 preg_match 46.52% 28
17 file_get_contents 46.48% 8
18 is_file 44.43% 6
19 array_values 42.81% 7
20 file_put_contents 42.46% 4
21 trim 41.57% 25
22 method_exists 41.49% 8
23 defined 40.87% 19
24 is_string 40.76% 20
25 function_exists 40.29% 20
26 array_map 39.33% 12
27 preg_replace 39.02% 17
28 strtolower 38.94% 19
29 is_dir 38.67% 6
30 strtr 38.01% 5
31 call_user_func 37.01% 4
32 strrpos 36.70% 4
33 call_user_func_array 36.43% 3
34 array_flip 35.89% 2
35 fwrite 35.89% 4
36 rtrim 35.69% 6
37 filter_var 35.65% 2
38 ini_get 35.15% 5
39 json_decode 34.76% 7
40 array_filter 34.76% 7
41 realpath 34.15% 4
42 header 34.07% 7
43 class_exists 34.03% 12
44 json_encode 33.49% 9
45 trigger_error 32.95% 5
46 get_class 32.95% 13
47 spl_autoload_register 32.10% 1
48 unlink 30.43% 5
49 headers_sent 29.78% 1
50 is_object 29.31% 11
51 mkdir 29.20% 2
52 array_shift 28.69% 6
53 spl_autoload_unregister 28.54% 1
54 apcu_fetch 28.23% 0
55 array_pop 28.11% 5
56 stream_resolve_include_path 27.84% 0
57 is_int 27.65% 5
58 apcu_add 27.57% 0
59 getcwd 27.49% 1
60 strtoupper 27.42% 6
61 is_numeric 26.95% 9
62 array_unique 26.91% 4
63 ltrim 26.60% 4
64 basename 26.57% 4
65 str_repeat 26.26% 7
66 fopen 25.91% 6
67 array_slice 24.94% 3
68 getenv 24.94% 4
69 var_export 24.71% 3
70 preg_match_all 24.67% 3
71 is_callable 24.48% 4
72 reset 24.44% 4
73 preg_split 24.40% 3
74 fclose 24.36% 5
75 array_unshift 24.25% 3
76 gettype 24.21% 4
77 end 23.90% 3
78 array_search 23.82% 3
79 max 23.78% 5
80 extension_loaded 23.59% 3
81 is_bool 23.55% 2
82 version_compare 22.82% 3
83 preg_quote 22.78% 3
84 time 22.70% 9
85 ucfirst 22.66% 4
86 ksort 22.66% 2
87 preg_replace_callback 22.54% 3
88 md5 22.51% 4
89 array_reverse 22.47% 2
90 array_diff 22.12% 2
91 is_readable 22.00% 1
92 microtime 21.96% 4
93 copy 21.81% 1
94 parse_url 21.81% 2
95 is_null 21.50% 17
96 base64_encode 21.42% 3
97 current 21.38% 2
98 is_resource 21.08% 3
99 serialize 20.77% 4
100 key 20.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

2022functionfunctionsfunctions-phpgitlearn-to-codelearninglearning-by-doinglearning-exerciseopen-sourcephpphp-2022php-5php-7php-8php7php8

Resources

Readme
GPL-3.0 license
Activity

Stars

39 stars

Watchers

1 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.