Aliens School
Cinematic Knowledge Experience
0%
Aliens School
Now Playing
Aliens School · HIEN
⌨️ Keyboard Shortcuts
Next slide Previous slide SpacePlay / Pause MNarration on/off FFullscreen ?Show/hide this
Press any key to close
Skill Topic · Cinematic

PHP Type Declarations — Types Ko Enforce Karna

Version: v2.0.0 | Modified: 2026-03-25 PHP ek dynamically typed language hai — matlab tumhe…

Overview
🌟

PHP Type Declarations — Types Ko Enforce Karna — Quick Facts

📌

`) se separate karke. `int: string` ka matlab hai "is…

Topic 1
📥 📥 🧠 🔬 💡 🎯

Type Declarations Kya Hain?

💡

PHP 5: Sirf class/interface type…

🔑

PHP 7.0: Scalar types (int, float,…

PHP 7.1: Nullable (?type), void,…

🎯

PHP 7.4: Typed properties (class…

Topic 2
💡 📊 🔬

Parameter Type Declarations

💡 Sabse pehle aur sabse common use hai parameters par type lagana. Jab tum function banate…
Topic 3
🔒

Return Type Declarations

🎯 Function ka return type declare karna equally important hai. Return type se tumhe aur…
Topic 4

Nullable Types — `?type`

Real-world me aksar aisa hota hai ke ek function ko value bhi mil sakti hai aur null bhi.…
Topic 5
📥 📥 🧠 🔬 💡 🎯

Union Types (PHP 8.0+)

🔑 Nullable types sirf "type ya null" allow karte hain. Lekin agar tumhe "int ya string"…
Topic 6
📊 🔬

Intersection Types (PHP 8.1+)

Union types me "ya" ka concept tha — int YA string. Intersection types me "aur" ka…
Topic 7
🔒

Strict Mode — `declare(strict_types=1)`

🌟 Yeh ek bahut important setting hai jo PHP ka type checking behavior fundamentally change…
Topic 8
🚀

Typed Properties (PHP 7.4+)

🚀 PHP 7.4 se pehle class properties par type enforce karne ka koi proper tareeqa nahi tha.…
Topic 9
📥 📥 🧠 🔬 💡 🎯

Constructor Promotion (PHP 8.0+)

📚 Pehle PHP me class properties declare karna aur phir constructor me unhe assign karna…
Topic 10

Special Types — mixed, never, self, static

💡 PHP me kuch special types hain jo regular scalar types se alag hain. mixed (PHP 8.0+) ka…
Topic 11
🔒

All Types Reference Table

🎯 Yeh table PHP ke saare available types ka quick reference hai. Har type ke saath uska PHP…
Topic 12

Summary

💡

Parameter types: function f(int…

🔑

Return types: function f(): int —…

Nullable: ?string = string ya null…

🎯

Union: int|string = int ya string…

Quick Quiz
🧠 QUIZ TIME

Quiz — Question 1

PHP Type Declarations — Types Ko Enforce Karna ka sabse sahi definition kya hai?

Complete! 🎉
COMPLETE

PHP Type Declarations — Types Ko Enforce Karna Complete!

Aliens School · HIEN · Cinematic Knowledge

PHP Type Declarations — Types Ko Enforce Karna Complete

1/16
0:00
REC 00:00ESC=Cancel
Aliens School
3
Recording shuru hone wali hai...
Recording Complete
Video process ho rahi hai...
Live Class
Slide 1 / 7
Timer
00:00
📝 Speaker Notes
⏭️ Up Next
🗂️ All Slides