loosely and strongly typed language in php

It is for static page, dynamic page, website, SEO, performance and other web development discussion
Joshi jahanvi

loosely and strongly typed language in php

Postby Joshi jahanvi » Thu Sep 11, 2014 4:02 pm

Is PHP a loosely Typed Language? What is the difference between strongly typed and loosely typed language?


Re: loosely and strongly typed language in php

Postby Guest » Wed Oct 08, 2014 1:35 pm

Yes,PHP is a loosely typed language .

Loosely Typed Language :
In PHP, a variable does not need to be declared before adding a value to it.
PHP automatically converts the variable to the correct data type, depending on its value.

Strongly Typed Language
1.A statically typed language has a type system that is checked at compile time by the implementation with the help of a compiler or an interpreter.
2.The type check rejects some programs, for example, the compiler guarantees not to use integer arithmetic instructions on floating-point numbers.
3.For "strongly typed" language, it is not possible for the programmer to work around the restrictions imposed by the type system.

Return to “PHP, HTML, MYSQL and Web Hosting”

Who is online

Users browsing this forum: No registered users and 2 guests