PHP OOps

PHP Oops In Hindi – PHP OOPs Concepts In Hindi

PHP

PHP Oops In Hindi PHP OOPs Concepts In Hindi:- PHP Object-Oriented Programming Language Hai Or PHP OOPs Concepts In Hindi Mai 2 Types ke program paradigm ka use Kiya Jata Hai | Yah “Procedure Oriented” Or “Object-oriented programming” Hai | Aaj Ke Time Ki Sabhi programming languages Object-oriented programming Ko Istemal Karti Hai |

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

PHP Oops In Hindi

Python Oops In Hindi

Features of Object-Oriented Programming in Hindi

  • Class
  • Object
  • Method
  • Inheritance
  • Polymorphism
  • Data Abstraction
  • Encapsulation

Niche Diye Gaye PHP Object-oriented Support ko Bataya Gaya hai |

PHP OOPs Concepts In Hindi

Ab Ham OOps Concepts In PHP In Hindi Ko Understand Karte Hain Ek Ek Karke |

Class

Class ek user-defined data type hai | ye C language mei structure ki tarah hi hota hai | lekin classes mei aap variable ke sath sath unse related functions bhi bana sakte hai | jinhe aap bad mei objects ke duvara access kiya ja sakta hai |

Class Definition Syntax:

<?php
class MasterPrograming {
  // code goes here...
}
?>

Class Definition Example:

PHP Class Ko Define Kar Diya Hai.Lekin Ab Ham Class Ke Under Function Create karte Hain set_name() for Set Karne ke Liye And get_name() for get Karne Ke Liye String Varaible Ko |

<?php
class MasterPrograming {
  // Properties
  public $name;
  public $work;

  // Methods
  function set_name($name) {
    $this->name = $name;
  }
  function get_name() {
    return $this->name;
  }
}
?>

Objects

Class ek user-defined data type hai | Class type ke variables ko objects Kaha jata hai |

object creation syntax:1

$object_name = class_name ;

object creation example:1

$dk = new MasterPrograming();

$dk->set_name('Danish');
echo $dk->get_name();

Aapko Pta Hoga Ki Hamne Class MasterPrograming Create Kiya Tha Upper Or Ab Hamne Us Class Ka Ek $dk Obj Create Kiya Hai | Aap Kitne Bhi object create Kar Sakte Hai |

Class Output:

Danish

Method

PHP Method Overriding Ye OOP Ka Ek Hissa Hai| Method Overriding Ka Istemal Inheritance Mai Kiya Jata Hai | Isme Ek Hi Name Ke Function Ko Alag Alag Class Mai Alag Alag Definition Di Jati Hai | Method Overriding Mai Function Ko Override Kiya Jata Hai |

Syntax for Method Overriding

class ClassName extends AnotherClass
{
	
	function __construct(argument)
	{
		# code...
	}
}

Abstraction

Abstraction Means ki end-user ko Wahi functionality show ki Jaye Jiski Usko Jarurat hai | Baki background functionality hide Kar di Jaye |

Encapsulation

Encapsulation ko data hiding Bhi Kahte hai | Sath hi encapsulation Ke duvara data or functions ko outside access se protect Kiya Jata hai | Encapsulation ke 3 types hote hai ( Public, Private, Protected) ka protection provide karti hai |

Inheritance

Inheritance object-oriented programming ka concept hai | Jisme Ek code ko dusri jagah par istemal Kiya ja Sakta hai | ye code re-usability implement Karta hai |

Polymorphism

PHP mei Polymorphism function overloading duvara implement Kiya jata hai | jisme ek name ke functions ko alag alag conditions mei execute kiya jata hai |

Abhi Tak Ham Ne Keval PHP Oops Ke Conpect Ko Understand Kiya Hai Inke Har Ek Function Ke Liye Hamne Alag Se Post Publish Kiye Aap Unhe Bhi Read Kar Sakte Hai |

Also Read This Post :

Dosto mujhe ummed hai ki aap PHP Object Oriented Programming in Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *