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

Overview

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/

You might also like...
Magento 2 Finnish Language Pack is the perfect guide so that you can enable Finnish on your magento 2 store. This translation is really necessary for everyone who are living in the Finland. Here is a step-by-step guide to install Finnish package and use it as the default language. Universal extension installer for Magento 2, see introductory blog post here
Universal extension installer for Magento 2, see introductory blog post here

ExtDN Installer for Magento 2 modules The installation of extensions for Magento 2 has a few scenarios to cover depending on your starting position (M

Adds factory functions for WooCommerce to be used with wp-browser integration tests.

wp-browser-woocommerce This library simplifies testing of WooCommerce themes and plugins with wp-browser. Several Unit Test Factories are added that a

This library can be used, among other things, to retrieve the classes, interfaces, traits, enums, functions and constants declared in a file

marijnvanwezel/reflection-file Library that allows reflection of files. This library can be used, among other things, to retrieve the classes, interfa

Magento-Functions - A Resource of Magento Functions

Magento-Functions A Resource of Magento Functions Table of Contents Category Product User Cart Checkout General Account [Working w/ URL's] (#urls) Cat

This is a Native PHP MVC. If you will build your own PHP project in MVC with router, you can clone this ready to use MVC pattern repo.

Welcome to PHP-Native-MVC-Pattern 👋 If you will build your own PHP project in MVC with router, you can clone this ready to use MVC pattern repo. Work

Native desktop applications with PHP
Native desktop applications with PHP

php-gui php-gui allows you to build desktop ui applications with PHP only. It leverages FFI extension and Tcl/Tk for that, thus you don't need to comp

YogsMAP adalah GIS(Geographic Information System) yang dibangun dengan PHP Native, MapBox API dan Boostrap
YogsMAP adalah GIS(Geographic Information System) yang dibangun dengan PHP Native, MapBox API dan Boostrap

YogsMAP adalah GIS(Geographic Information System) yang dibangun dengan PHP Native, MapBox API dan Boostrap. Website ini menampilkan data pada area di yogyakarta, serta bisa menampilkan lokasi-lokasi yang diinginkan.

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface

A simple, standalone, modern PHP class inspector and mapper library, wrapping PHPs native reflection in a fluent interface.

Owner
Max Base
Open Source Maintainer. Full-Time Open-Sourcerer. Full-stack programmer. In the path of a real computer engineer... (Compiler enthusiast)
Max Base
The Current US Version of PHP-Nuke Evolution Xtreme v3.0.1b-beta often known as Nuke-Evolution Xtreme. This is a hardened version of PHP-Nuke and is secure and safe. We are currently porting Xtreme over to PHP 8.0.3

2021 Nightly Builds Repository PHP-Nuke Evolution Xtreme Developers TheGhost - Ernest Allen Buffington (Lead Developer) SeaBeast08 - Sebastian Scott B

Ernest Buffington 7 Aug 28, 2022
⚡ Php snippets, random stuff, demos, functions, fast message system, agnostic and framework free - 100% compactible ;) ⚡

⚡ Php8 FPM Nginx Fast, Scripts, Pearls & Treasures ?? Want to run and test asap ? docker-compose up -d phpgit_php8;ip=$(docker-machine ip default);ech

Benjamin FONTAINE 0 Mar 20, 2022
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
I create this code to upload CSV in database in packets of 100.

PHP-CSV-Upload I create this code to upload CSV in the database in packets of 100 elements in one for loop. Hi, This is Anmol Singh. To reach our Goal

Anmol Singh 2 Feb 12, 2022
The most widely used PHP client for RabbitMQ

php-amqplib This library is a pure PHP implementation of the AMQP 0-9-1 protocol. It's been tested against RabbitMQ. The library was used for the PHP

php-amqplib 4.2k Jan 3, 2023
just the most basic functions of the website.

cybergrungewebsite just the most basic functions of the website. upload handling the artists folder contains custom upload.php which handles uploads.

Ellie 6 Dec 8, 2022
Here is an Instagram Guest API. Gather all public information as JSON format without logging yourself.

Here is an Instagram Guest API. Gather all public information as JSON format without logging yourself. It's all automation and time saving.

Quatrecentquatre 1 Nov 2, 2021
Here are few exercises to practice how to implement API Security with NGINX App-Protect WAF.

api-security-lab This repo contains files for customers and partners to practice an API Security with NGINX App-Protect WAF. To demonstrate the capabi

null 4 Mar 30, 2022
School stuff, nothing to see here

Come importare/aggiornare i dati su altervista Scaricare la repo (Code > Download as ZIP) Estrai lo zip In database_backup tasto destro su dantoniog.s

Kryotek 3 Dec 18, 2021
All about docker projects either from dockerfile or compose. Anyway, here the project is in the form of a service, for the programming language I will make it later

Docker Project by ItsArul Hey, yo guys okay, this time I made some projects from Docker. Anyway, this project is open source, for example, if you want

Kiyo 10 Nov 4, 2022