i
PHP Variables
PHP Data Types
PHP Echo & Print
PHP Strings
PHP Numbers
PHP Constants
PHP Operators
PHP if...else...elseif Statements
Switch Statement
PHP Loops
PHP Arrays
Superglobals
PHP Coding Standards
PHP Form Handling
PHP Form Validation
PHP URLs Validation
PHP Form Required Validation
Complete Form Example
PHP File Functions Open/Read
PHP File Create/Write
PHP File Upload
PHP Cookies Handling
PHP Session Handling
PHP filter_var() Function
PHP Validation Filters
PHP Sanitization Filters
Using Filters
Filters Advanced
JSON
PHP Date and Time
MySQL Database
MySQL Connect
MySQL Commands-Creating a Table
MySQL Commands-Inserting The data
MySQL Commands-Prepared Statement
MySQL Commands-Selecting The Data
MySQL Commands-Where and Order By
MySQL Commands-Deleting And Updating The Data
PHP-OOP Introduction
PHP-Classes/Objects
PHP-Constructor/Destructor
PHP-Access Modifiers
PHP-Inheritance
PHP-Inheritance and Protected Access Modifier
PHP-Overriding Inherited Methods
PHP-Final keyword
PHP-Abstract Classes
PHP-Constants
PHP-Traits
PHP-Static Methods and Properties
Introduction to Functions
Defining A function
Returning Values From A Function
Dynamic Function Calls
Variable Scope
Understanding Arguments Or Parameters
Testing For A Function Existence
Returning Multiple Values From A Function
Making practical Use By Building Code Libraries For Code Re-usability
Using Include() And Require()
Numbers are an essential data type in PHP. Most of the data and information we deal with for complex programs require amounts. There are many types of numeric data that we can use in php and mathematical functions. To print a number in php, you can write echo 40; and it will print 40. You can make the number negative, i.e. -40 or decimal like 40.37.
Integer – an Integer is a whole number without any decimal part, and it can include negative numeric values also. A non-decimal number between -2147483648 and 2147483647 is an integer value in php.
Float – Float is the numbers with decimal values or in an exponential form such as 4.5, 647.3, 2.567, 8.34E+2, 4.23E-1 are all float values, and it can store amounts up to 1.7976931348623E+308 with a precision of 14 digits.
Infinity – A numeric value more significant than PHP_FLOAT_MAX is an infinite numeric value, and you can check the value is finite or infinite using is_finite() or is_infinite() functions.
NaN – For a mathematical operation that is not possible NaN, i.e. Not a number is present in php. You can check if the value is not a number through is_nan() function.
Casting – If you need to throw a numeric value into another data type, you can use casting functions such as (int), (integer) or intval(). You can convert string values or float values to integers using these functions.
Don't miss out!