Skip to main content

Posts

Showing posts with the label Introduction to PHP Classes

PHP classes and objects (Php class part 8 in Hindi language)

  PHP classes and objects  Introduction to PHP Classes  PHP में class एक object oriented programming feature है। इसके द्वारा आप किसी data और उस पर perform होने वाले operations को एक साथ bind करते है। एक class में data properties (variables) के द्वारा represent किया जाता है। Data पर perform होने वाले operations class में function द्वारा represent किये जाते है। Bind Data and Behaviour Together Class c language में structure की तरह होती है। जिस प्रकार c language में structure के अंदर अलग अलग data types के variables create करके उनका एक compound type create किया जाता है। और बाद में उस type के variables create किये जाते है। उसी प्रकार एक PHP class में भी आप अलग अलग data types के variables create कर सकते है। फर्क सिर्फ इतना होता है की class में आप variables के आलावा functions भी define कर सकते है। इस प्रकार class भी एक type होती है, जिसके variables objects कहलाते है। Class is a Blueprint Class को आप एक घर के नक़्शे की तरह समझ सकते है। इस नक़्शे के आधार पर कई ...