Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does php turn positive numbers into negative numbers

Shulou Source: shulou.com Published: 2022-05-31 11:01:00 10月01日 Update

This article mainly explains "how php turns positive numbers into negative numbers". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how php turns positive numbers into negative numbers".

1. Create a sample PHP file.

2. Define a positive variable.

3. Convert a positive number to a negative number by "$number * =-1;".

Example

$number = 99% echo number * =-1 × echo $number; / / output-99

Attached:

A negative number becomes a positive number.

$number =-11 result; result = abs ($number); echo $result; / / output 11 Thank you for reading, this is how php turns positive numbers into negative numbers, after the study of this article, I believe you have a deeper understanding of how php turns positive numbers into negative numbers, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Positive negative learning content output variables examples that is ideas situations files articles methods more knowledge knowledge points examples articles follow questions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei macOS NVidia MySQL