MemoryRefresh!

Definition



Questions Answers 0%

Pages   0 from 51
Questions   0 from 84

Reset



PHP is loosely typed, meaning that it will implicitly change the type of a variable as needed, depending on the operation being performed on its value. This contrasts with strongly typed languages, like C and Java, where variables can only contain one type of data throughout their existence. Must be named using only letters, numbers and underscore. Must start with a letter or an underscore.
<php $name = 'valid'; // Valid name $_name = 'valid'; // Valid name $1name = 'invalid'; // Invalid name, starts with a number Are one of only two identifier types in PHP that are case-sensitive (the other is constants)
<?php error_reporting(E_ALL); $Name = "John"; echo $name; // Notice: Undefined variable: name
Questions

Related pages

Definition !
Variable !
Check !
Type casting !
Array to object !
New object !


0% 100%
 
 
0 pages 51 pages
1) Php variables are strongly typed




2) A variable can contain only one type of data




3) Php variables are case sensitive




Last Review: n/a   Passed: n/a   Reviews: n/a   Next Review: n/a  


PHP is loosely typed, meaning that it will implicitly change the type of a variable as needed, depending on the operation being performed on its value. This contrasts with strongly typed languages, like C and Java, where variables can only contain one type of data throughout their existence. Must be named using only letters, numbers and underscore. Must start with a letter or an underscore.
<php $name = 'valid'; // Valid name $_name = 'valid'; // Valid name $1name = 'invalid'; // Invalid name, starts with a number Are one of only two identifier types in PHP that are case-sensitive (the other is constants)
<?php error_reporting(E_ALL); $Name = "John"; echo $name; // Notice: Undefined variable: name



More from Php

Basics
Variables
Operators
Function
Array
String
Streams
Uncategorized


More from Programming

Php
jQuery




Powered by minte9.com