Constants can’t override once declared
Only Upper Case Characters
No Dollar Sign!
<?php
/* *
* Constants
* - Constants can't override once declared
* - Only Upper Case Characters
* - No Dollar Sign
*/
define('VARR', "Hello World");
define('SOME_VAR', 150);
echo VARR;
echo "<br>";
echo SOME_VAR;
define('HELLO', "Hello World");
echo HELLO;
define('HELLO', 123);
echo HELLO;
?>
Variables CRUD Operations in PHP
<?php
/* *
* Variables CRUD Operations
*/
// Create
$var = 50;
// Read
echo $var;
// Update
$var = 80;
// Read Again
echo $var;
// Delete
unset($var);
// Read Again and You will get Undefine Variable Error
echo $var;
?>
Naming Rules, No Space, No Special Characters ( Shift + 1 to 0), / \ ? . > < = ~ ` ' " { ( [ | ; : ,
Can’t be a Number on First Character
Case-sensitive
<?php
/**
* Naming Rules
* - No Space
* - No Special Characters ( Shift + 1 to 0)
* - / \ ? . > < = ~ ` ' " { ( [ | ; : ,
* - Can't be a Number on First Character
* - Case-sensitive
*/
/*
/ - Slash
\ - Backslash
? - Question Mark
> - Greater Than
< - Less Than
= - is equal to
~ - Tilde symbol
` - Back Quote or Back Tip
' - Single Quote
" - Double Quote
{} - Curly Brackets
() - Parentheses or Round Backets
[] - Square Brackets
| - Pipe Symbol
; - Semi-colon
: - Colon
& - Ampersand
* - Asterisk
# - Hash
*/
$var = 10;
$var1 = 50;
$v2ar = "Hello World";
$var_two = 90;
$va_r = 40;
$_var_ = 120;
$vAR = 150;
$Var = 250;
$VAR = 550;
$vAr = 510;
// You can Override Variables by Redeclaring
$vAr = 300;
echo $vAr;
?>
Thats the PHP programming basic of our future.
Sharing is Caring
Dragon Knight
We want our admin, who is always working hard despite his busy schedule, to be very successful and everything will be fine.
Right, admin’s wishes be fully furnished. πππ
Ma Ma
I want to be comfortable because he work hard.
Thank for sharing
For one who strives, success is at in the hand.
Thanks a lot for your sharing.
Fighting admin πͺπͺπͺ
Thanks for sharing ur awesome knowledge. We hope you were be at the top and safe place Admin.
Thanks for sharing
Thanks for sharing
Thank you
Thanks for sharing.
really attract it..
an you learm me
thanks admin
Thank u so much
Actually this is all I can comment for Positive onesπ¬π¬
Thanks
Thanks for sharing
Morning everyone, Have a honey day.π―