{"id":13405008,"url":"https://github.com/BaseMax/TopPHPFunctions","last_synced_at":"2025-03-14T09:32:04.289Z","repository":{"id":151535623,"uuid":"519997190","full_name":"BaseMax/TopPHPFunctions","owner":"BaseMax","description":"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.","archived":false,"fork":false,"pushed_at":"2022-12-09T08:29:44.000Z","size":55,"stargazers_count":36,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-10T15:11:53.325Z","etag":null,"topics":["2022","function","functions","functions-php","git","learn-to-code","learning","learning-by-doing","learning-exercise","open-source","php","php-2022","php-5","php-7","php-8","php7","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-01T06:51:15.000Z","updated_at":"2025-02-06T21:34:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"e8120a19-00be-4a18-b32d-052c381ed02d","html_url":"https://github.com/BaseMax/TopPHPFunctions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTopPHPFunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTopPHPFunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTopPHPFunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FTopPHPFunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/TopPHPFunctions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243554119,"owners_count":20309869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2022","function","functions","functions-php","git","learn-to-code","learning","learning-by-doing","learning-exercise","open-source","php","php-2022","php-5","php-7","php-8","php7","php8"],"created_at":"2024-07-30T19:01:54.480Z","updated_at":"2025-03-14T09:32:04.276Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","readme":"# Top PHP Functions\n\nIf you are a PHP developer, you must know the Top 100 PHP Functions deeply.\n\n## The 100 PHP functions that you have to know (2022)\n\nHere is the top 100 PHP functions: it is the list of the most often used PHP native functions.\n\n\u003e Why this repository? As a lead developer in the team, I am teaching the functions to my team members deeply.\n\n## Where is the Data?\n\nThe functions are named, and ranked from 1 to 100. The other 4500 functions are not ranked here.\n\nThe 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…).\n\n### PHP Functions\n\n| Rank\t | Function\t | Frequency\t | Average |\n| ------ | --------- | ------------- | ------- |\n| 1\t | file_exists\t | 62.80%\t | 13 |\n| 2\t | str_replace\t | 58.20%\t | 33 |\n| 3\t | implode\t | 57.31%\t | 35 |\n| 4\t | count\t | 56.42%\t | 61 |\n| 5\t | dirname\t | 56.38%\t | 13 |\n| 6\t | substr\t | 55.84%\t | 53 |\n| 7\t | sprintf\t | 55.26%\t | 80 |\n| 8\t | strpos\t | 55.07%\t | 24 |\n| 9\t | array_merge\t | 54.80%\t | 35 |\n| 10\t | in_array\t | 51.39%\t | 33 |\n| 11\t | explode\t | 51.35%\t | 26 |\n| 12\t | strlen\t | 50.97%\t | 35 |\n| 13\t | is_array\t | 50.73%\t | 46 |\n| 14\t | array_key_exists\t | 49.54%\t | 28 |\n| 15\t | array_keys\t | 49.27%\t | 16 |\n| 16\t | preg_match\t | 46.52%\t | 28 |\n| 17\t | file_get_contents\t | 46.48%\t | 8 |\n| 18\t | is_file\t | 44.43%\t | 6 |\n| 19\t | array_values\t | 42.81%\t | 7 |\n| 20\t | file_put_contents\t | 42.46%\t | 4 |\n| 21\t | trim\t | 41.57%\t | 25 |\n| 22\t | method_exists\t | 41.49%\t | 8 |\n| 23\t | defined\t | 40.87%\t | 19 |\n| 24\t | is_string\t | 40.76%\t | 20 |\n| 25\t | function_exists\t | 40.29%\t | 20 |\n| 26\t | array_map\t | 39.33%\t | 12 |\n| 27\t | preg_replace\t | 39.02%\t | 17 |\n| 28\t | strtolower\t | 38.94%\t | 19 |\n| 29\t | is_dir\t | 38.67%\t | 6 |\n| 30\t | strtr\t | 38.01%\t | 5 |\n| 31\t | call_user_func\t | 37.01%\t | 4 |\n| 32\t | strrpos\t | 36.70%\t | 4 |\n| 33\t | call_user_func_array\t | 36.43%\t | 3 |\n| 34\t | array_flip\t | 35.89%\t | 2 |\n| 35\t | fwrite\t | 35.89%\t | 4 |\n| 36\t | rtrim\t | 35.69%\t | 6 |\n| 37\t | filter_var\t | 35.65%\t | 2 |\n| 38\t | ini_get\t | 35.15%\t | 5 |\n| 39\t | json_decode\t | 34.76%\t | 7 |\n| 40\t | array_filter\t | 34.76%\t | 7 |\n| 41\t | realpath\t | 34.15%\t | 4 |\n| 42\t | header\t | 34.07%\t | 7 |\n| 43\t | class_exists\t | 34.03%\t | 12 |\n| 44\t | json_encode\t | 33.49%\t | 9 |\n| 45\t | trigger_error\t | 32.95%\t | 5 |\n| 46\t | get_class\t | 32.95%\t | 13 |\n| 47\t | spl_autoload_register\t | 32.10%\t | 1 |\n| 48\t | unlink\t | 30.43%\t | 5 |\n| 49\t | headers_sent\t | 29.78%\t | 1 |\n| 50\t | is_object\t | 29.31%\t | 11 |\n| 51\t | mkdir\t | 29.20%\t | 2 |\n| 52\t | array_shift\t | 28.69%\t | 6 |\n| 53\t | spl_autoload_unregister\t | 28.54%\t | 1 |\n| 54\t | apcu_fetch\t | 28.23%\t | 0 |\n| 55\t | array_pop\t | 28.11%\t | 5 |\n| 56\t | stream_resolve_include_path\t | 27.84%\t | 0 |\n| 57\t | is_int\t | 27.65%\t | 5 |\n| 58\t | apcu_add\t | 27.57%\t | 0 |\n| 59\t | getcwd\t | 27.49%\t | 1 |\n| 60\t | strtoupper\t | 27.42%\t | 6 |\n| 61\t | is_numeric\t | 26.95%\t | 9 |\n| 62\t | array_unique\t | 26.91%\t | 4 |\n| 63\t | ltrim\t | 26.60%\t | 4 |\n| 64\t | basename\t | 26.57%\t | 4 |\n| 65\t | str_repeat\t | 26.26%\t | 7 |\n| 66\t | fopen\t | 25.91%\t | 6 |\n| 67\t | array_slice\t | 24.94%\t | 3 |\n| 68\t | getenv\t | 24.94%\t | 4 |\n| 69\t | var_export\t | 24.71%\t | 3 |\n| 70\t | preg_match_all\t | 24.67%\t | 3 |\n| 71\t | is_callable\t | 24.48%\t | 4 |\n| 72\t | reset\t | 24.44%\t | 4 |\n| 73\t | preg_split\t | 24.40%\t | 3 |\n| 74\t | fclose\t | 24.36%\t | 5 |\n| 75\t | array_unshift\t | 24.25%\t | 3 |\n| 76\t | gettype\t | 24.21%\t | 4 |\n| 77\t | end\t | 23.90%\t | 3 |\n| 78\t | array_search\t | 23.82%\t | 3 |\n| 79\t | max\t | 23.78%\t | 5 |\n| 80\t | extension_loaded\t | 23.59%\t | 3 |\n| 81\t | is_bool\t | 23.55%\t | 2 |\n| 82\t | version_compare\t | 22.82%\t | 3 |\n| 83\t | preg_quote\t | 22.78%\t | 3 |\n| 84\t | time\t | 22.70%\t | 9 |\n| 85\t | ucfirst\t | 22.66%\t | 4 |\n| 86\t | ksort\t | 22.66%\t | 2 |\n| 87\t | preg_replace_callback\t | 22.54%\t | 3 |\n| 88\t | md5\t | 22.51%\t | 4 |\n| 89\t | array_reverse\t | 22.47%\t | 2 |\n| 90\t | array_diff\t | 22.12%\t | 2 |\n| 91\t | is_readable\t | 22.00%\t | 1 |\n| 92\t | microtime\t | 21.96%\t | 4 |\n| 93\t | copy\t | 21.81%\t | 1 |\n| 94\t | parse_url\t | 21.81%\t | 2 |\n| 95\t | is_null\t | 21.50%\t | 17 |\n| 96\t | base64_encode\t | 21.42%\t | 3 |\n| 97\t | current\t | 21.38%\t | 2 |\n| 98\t | is_resource\t | 21.08%\t | 3 |\n| 99\t | serialize\t | 20.77%\t | 4 |\n| 100\t | key\t | 20.57%\t | 2 |\n\nSource: https://www.exakat.io/en/the-100-php-functions/\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBaseMax%2FTopPHPFunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBaseMax%2FTopPHPFunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBaseMax%2FTopPHPFunctions/lists"}