Final Keyword in PHP in Hindi – Final Keyword क्या है?

PHP में final keyword का इस्तेमाल किसी class, method, या property को समाप्त (final) करने के लिए किया जाता है। इसका मतलब है कि हम किसी class, method या property को extend नहीं कर सकते या override नहीं कर सकते। दूसरे शब्दों में कहें तो, “PHP में final कीवर्ड का इस्तेमाल Class या Method को … Read more

Object Iteration in PHP in Hindi – Object Iteration क्या है?

Object Iteration का मतलब है कि हम एक object की properties को एक-एक करके एक्सेस (Access) कर सकते हैं। यह लूप (Loop) का इस्तेमाल करके किया जाता है। PHP में, हम foreach लूप का इस्तेमाल करके ऑब्जेक्ट की properties को iterate कर सकते हैं। PHP में object iteration करने के लिए Iterator interface का उपयोग … Read more

Namespace in PHP in Hindi – Namespace क्या है?

PHP में namespace एक तरीका है जो नामों के टकराव (conflicts) को रोकने में मदद करता है। जब हम अलग-अलग class, function या constants को एक ही नाम से लिखते हैं, तो एक समय बाद इनका टकराव हो सकता है। दूसरे शब्दों में कहें तो, “PHP में Namespace एक ऐसा concept है जो हमें code … Read more

Static Properties in PHP in Hindi – Static Properties क्या हैं?

Static properties वो properties होती हैं, जो class के instance (object) से independent (स्वतंत्र) होती हैं। इसका मतलब यह है कि static properties को class के object बनाए बिना भी access किया जा सकता है। Static properties को class के भीतर define किया जाता है और इनके लिए static कीवर्ड का इस्तेमाल किया जाता है। … Read more

Static Methods in PHP in Hindi – Static Methods क्या होते हैं?

PHP में, static method एक ऐसा method होता है जो किसी class का instance (object) बनाए बिना ही सीधे call किया जा सकता है। अर्थात, हमें object को create करने की जरूरत नहीं होती। Static Methods को class name के साथ access किया जाता है, और इनका इस्तेमाल तब किया जाता है जब method को … Read more

Traits in PHP in Hindi – Traits क्या होते हैं?

PHP में Traits का इस्तेमाल multiple inheritance को manage करने के लिए किया जाता है, क्योंकि PHP में एक time पर एक class केवल एक class से inheritance ले सकती है। Traits का उपयोग करके हम अलग-अलग methods को classes में reuse कर सकते हैं। PHP 5.4 में Traits को introduce (प्रस्तावित) किया गया था। … Read more

Abstract Class in PHP in Hindi – Abstract Class क्या है?

PHP में Abstract Class एक प्रकार की class होती है, जिसे हम सीधे instantiate नहीं कर सकते। अर्थात् इसका इस्तेमाल objects को create करने के लिए नहीं किया जा सकता। Abstract Class को केवल एक blueprint की तरह use किया जाता है, जिसे हम दूसरे class में extend करते हैं। इसका उपयोग तब किया जाता … Read more

Interface in PHP in Hindi – PHP में इंटरफेस क्या है?

Interface एक class का blueprint होता है। Class की तरह ही interface में methods होते हैं, लेकिन variables नहीं होते।  दूसरे शब्दों में कहें तो, “Interface एक structure की तरह होता है। यह एक class को बताता है कि उसे कौन-कौन से methods implement करने हैं।” Interface में declare किए गए methods abstract होते हैं, … Read more

Inheritance in PHP in Hindi – Inheritance क्या है?

Inheritance का मतलब है कि एक class (child class) दूसरी class (parent class) की properties और methods को inherit (विरासत में प्राप्त) करती है। दूसरे शब्दों में कहें तो, “Inheritance का मतलब होता है “विरासत” या “उत्तराधिकार”। यह एक ऐसा तरीका है जिसमें एक class दूसरी class की properties और methods को inherit (या reuse) … Read more

Access Modifiers in PHP in Hindi – Access Modifiers क्या है?

PHP में, class और object की properties और methods को control करने के लिए Access Modifiers का इस्तेमाल किया जाता है। Access Modifiers यह तय करते हैं कि class के properties और methods को कहाँ से access किया जा सकता है। दूसरे शब्दों में कहें तो, “PHP में Access Modifiers का इस्तेमाल object-oriented programming (OOP) … Read more