We have learned so much about PHP, what are the knowledge points that you must know about PHP? Have you fully mastered it? If not, then follow this article to continue learning
Related recommendations:What is PDO in PHP? What are the common methods of using pdo objects?
Class and object processing functions:
class_alias(): Create an alias for a class
class_exists(): Check whether the class has been defined
get_called_class( :The name of the late static binding ("Late Static Binding") class get_class methods(): Returns an array consisting of the method names of the class
getclass_vars(: Returns an array consisting of the default attributes of the class get class(): Returns The class name of the object
get_declared_classes(): Returns an array consisting of the names of defined classes get declared_interfaces(): Returns an array containing all declared interfaces get_declared_traits(): Returns an array of all defined traits
get_object_vars(): Returns an associative array composed of object attributes get parent class(): Returns the parent class name of the object or class
interface_exists(): Checks whether the interface has been defined
is_a(): If the object belongs to this class or this class is the parent class of this object, it returns TRUEis subclass_of(): If this object is a subclass of this class, it returns TRUEmethod exists(): Check whether the method of the class exists
property exists(): Check whether the object or class has the attribute trait_exists(): Check whether the specified trait exists array-related functions
PDO database preprocessing function:
$pdo = new PDO(): Create a PDO object
$pdo->prepare(): Prepare the statement to be executed and return the statement object $stmt$stmt->bindParam(): Bind a parameter to the specified variable name
$stmt->bindValue(): Bind a value to a parameter Sstmt->bindColumn(): Bind a column to a PHP variable $stmt->execute(): Execute a prepared statement
$stmt->columnCount(): Returns a list in the result set $stmt->fecth(): Gets the next row from the result set
Sstmt->fecthAlII(): Returns a list containing all rows in the result set Array
$stmt->fecthColumn(): Returns a single column from the next row in the result set $stmt->fetchObject(): Gets the next row and returns it as an object
$stmt->rowCount( ): Returns the number of rows affected by the previous .SQL statement $stmt->setFetchMode(): Sets the default fetch mode for the statement
$stmt->debugDumpParams(): Prints a SQL preprocessing command
$stmt->errorCode(): Get the SQLSTATE related to the last statement handle operation
$stmt->errorInfo(): Get the extended error information related to the last statement handle operation File operation function
Commonly used array functions:
count()//Non-array returns 1.
key: Get the subscript of the element pointed to by the current pointer of the current array current: The current pointer obtained points to the element
next: Get the value of the next element, and move the pointer down prev: Get the value of the previous element, and move the pointer up
end: Move the pointer to the last element of the array, and return The value of the final pointer position reset: moves the pointer to the first element of the array, and returns the value of the final pointer position array keys: gets all the key names of an array, returns an index array array_values: gets all the values of an array , Return an index array
explode: Divide a string into multiple segments according to a specified rule (usually special characters), each segment is regarded as an element of the
array, return an index array
split is similar to explodeexplode('.', 'abc.txt') is equal to split(.,'abc.txt')
implode: All elements in an array are processed according to a specified rule (special characters), Splice all the elements into a string
join() Combine the array elements into a string
array merge: Merge refers to accumulating the elements in the two arrays. If the following array has the same subscript (key name: association) as the previous array, then the value of the later element will overwrite the previous one; if the index here has the same subscript, the subscript will be automatically modified and added to the front. in the array.
array reverse—returns the reversed array
arrayflip-exchanges the keys and values in the array
Data structure simulation function
array shift: Pop the element from the front of the array and get the value of the element array pop : Pop elements from the back of the array to get the value of the element
array unshift: Push elements from the front of the array to get the number of current array elements array push: Push elements from the back of the array to get the number of current array elements Number
Sort
rsort() function is used to sort array cells from high to low.
asort() function is used to sort the array cells from low to high and maintain the index relationship. The arsort() function is used to sort the array cells from high to low and maintain the index relationship.
The ksort() function is used to sort array cells from low to high by key name.
The krsort() function is used to sort array cells from high to low by key name.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What are the knowledge points you must know in PHP?. For more information, please follow other related articles on the PHP Chinese website!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools