Home Backend Development PHP Tutorial Some minor problems with php_PHP tutorial

Some minor problems with php_PHP tutorial

Jul 21, 2016 pm 03:36 PM
php one the difference and study tidy Compare of question

I have sorted out 2 for everyone to learn from

1. The difference between three equal signs and two equal signs "===" VS "=="

For example Your function will return these situations:
1. Number greater than 0
2. Number less than 0
3. Number equal to 0 (that is, 0)
4. False ( When it fails)
If you want to capture the failure situation at this time, you must use ===, not ==
Because == will not only match the 4th situation, but also the 3rd one situation, because 0 is also false!

Here comes one

$a='2';//Character type 2
$b=2;//Numeric type 2
$a==$b, Yes, both are 2
$a===$b, which is wrong because $a is character type and $b is numeric type. Although the value is the same, the type is different.


2. What are the three angle brackets in PHP? "<<<"

Copy code The code is as follows:

$somevar = <<put your code or words here
someword;

Here is the code snippet. One benefit of using code snippets in PHP is that when you need to output a piece of code (which can include multiple lines), the code snippet can maintain a more logical form. Often used to insert HTML code.

Note that someword is any character and represents a mark. <<
can be used to include both single quotes and double quotes in assignments. Well, there are many such in pw

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322097.htmlTechArticleI compiled 2 for everyone to learn: 1. The difference between three equal signs and two equal signs"== =" VS "==" For example, your function will return the following situations: 1. A number greater than 0 2, a number less than 0 3, etc...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The difference between Ether and Bitcoin What is the difference between Ether and Bitcoin The difference between Ether and Bitcoin What is the difference between Ether and Bitcoin Mar 19, 2025 pm 04:54 PM

The difference between Ethereum and Bitcoin is significant. Technically, Bitcoin uses PoW, and Ether has shifted from PoW to PoS. Trading speed is slow for Bitcoin and Ethereum is fast. In application scenarios, Bitcoin focuses on payment storage, while Ether supports smart contracts and DApps. In terms of issuance, the total amount of Bitcoin is 21 million, and there is no fixed total amount of Ether coins. Each security challenge is available. In terms of market value, Bitcoin ranks first, and the price fluctuations of both are large, but due to different characteristics, the price trend of Ethereum is unique.

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Detailed introduction to Ouyi okex opening and closing time Detailed introduction to Ouyi okex opening and closing time Mar 18, 2025 pm 01:06 PM

The Ouyi OKEx digital asset trading platform is different from the traditional securities market. It is open for trading 24 hours a day, and users can conduct fiat currency trading, currency trading and contract trading at any time. However, the platform will announce in advance and temporarily adjust trading time or rules in case of system maintenance upgrades or special market events (such as extreme market conditions causing severe market fluctuations), such as suspending trading or modifying contract trading position opening rules. Therefore, it is recommended that users pay close attention to platform announcements and market trends, seize trading opportunities and do a good job in risk management. Only by understanding Ouyi OKEx trading time and rule adjustments can you be at ease in the digital currency market.

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

What is the function of C language sum? What is the function of C language sum? Apr 03, 2025 pm 02:21 PM

There is no built-in sum function in C language, so it needs to be written by yourself. Sum can be achieved by traversing the array and accumulating elements: Loop version: Sum is calculated using for loop and array length. Pointer version: Use pointers to point to array elements, and efficient summing is achieved through self-increment pointers. Dynamically allocate array version: Dynamically allocate arrays and manage memory yourself, ensuring that allocated memory is freed to prevent memory leaks.

What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? What are PHP magic methods (__construct, __destruct, __call, __get, __set, etc.) and provide use cases? Apr 03, 2025 am 12:03 AM

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.

The difference between multithreading and asynchronous c# The difference between multithreading and asynchronous c# Apr 03, 2025 pm 02:57 PM

The difference between multithreading and asynchronous is that multithreading executes multiple threads at the same time, while asynchronously performs operations without blocking the current thread. Multithreading is used for compute-intensive tasks, while asynchronously is used for user interaction. The advantage of multi-threading is to improve computing performance, while the advantage of asynchronous is to not block UI threads. Choosing multithreading or asynchronous depends on the nature of the task: Computation-intensive tasks use multithreading, tasks that interact with external resources and need to keep UI responsiveness use asynchronous.

How many bitcoins are there How many bitcoins are there Mar 17, 2025 pm 04:54 PM

The total amount of Bitcoin is constant at 21 million, and this fact set by Satoshi Nakamoto code gives Bitcoin a unique value attribute. Unlike unlimited fiat currencies, Bitcoin’s scarcity gives it anti-inflation potential and is similar to precious metals such as gold. Its issuance mechanism is gradually released through "mining" and the reward is halved every four years, and it is expected to reach the total upper limit by around 2140. Although the actual circulation volume is less than the total volume, the total volume limit of 21 million coins is the core value support of Bitcoin, and it also makes it a highly-watched digital asset. Understanding the limit on the total amount of Bitcoin is crucial for investors to make rational decisions.

See all articles