Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

5. PHP Introduction & Data Types

Lesson 6 of 36 in the free Web Based Programming notes on Siksha Sarovar, written by Rohit Jangra.

Introduction to PHP & Data Types

PHP (Hypertext Preprocessor) is a powerful server-side scripting language. It is the backbone of many CMS platforms like WordPress and social networks like Facebook.

Why PHP is Essential for BCA:

  • Easy Integration: It embeds directly into HTML.
  • Database Support: Excellent support for MySQL/MariaDB.
  • Platform Independent: Runs on Windows, Linux, and macOS.

Detailed PHP Data Types

PHP is a loosely typed language, meaning you don't need to declare the data type explicitly. The type is determined by the value assigned.

Data TypeDescriptionExample
StringSequence of characters."Hello World"
IntegerNon-decimal whole numbers.42, -5
FloatDecimal or exponential numbers.19.99, 2.5e3
BooleanLogical values.true, false
ArrayCollection of values.[1, 2, 3]
ObjectInstance of a class.new Student()
NULLRepresents "No Value".null

The var_dump() Function

In PHP, the var_dump() function is used to dump information about a variable, including its type and value. This is extremely helpful for debugging!