PHP OOP Access Modifier Tutorial in Hindi / Urdu

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 133

  • @munazzamzubair1
    @munazzamzubair1 2 місяці тому

    ❤❤❤ mein iss waqt Java seekh rha hon mgr Mera Sara programming concept oops and procedural ka yahoo baba ka lectures sa clear Kiya ha yahoo baba sir is a very good channel for beginners

  • @aishwaryalanke1285
    @aishwaryalanke1285 3 роки тому +14

    I have learn php,SQL,json,ajax,mysqli and oops from your channel..Its really amazing and so helpful. This videos really clear the concept. your teaching techniques are really good that any1 can understand it easily.. thanks for sharing the knowledge 🙏

    • @YahooBaba
      @YahooBaba  3 роки тому +8

      Glad it helped! .... Your welcome :)

  • @ravi_sikarwar_19899
    @ravi_sikarwar_19899 Рік тому +2

    I was learnt whole this syllabus few years ago, but I was not understood anything in whole syllabus but your teaching techniques, now i have knowledge of PHP,MYSQL, JQUERY,CSS,HTML, JAVASCRIPT.thank you so much for avail all this language in free.🙏🙏🙏

    • @YahooBaba
      @YahooBaba  Рік тому +2

      All the best

    • @ravi_sikarwar_19899
      @ravi_sikarwar_19899 Рік тому

      @@YahooBaba thanks , and I'm following your free projects for gaining more techniques of coding.

  • @pahadimusicbaba8333
    @pahadimusicbaba8333 Місяць тому +2

    Toda muskil tha last me private vale case me lakin smj gya bhut kosis krne ke bad😂😂😂😂😂 bs tum ye smjo derived class ka use krke private ke name nam ka variables access nhi huuaa vo to jha pe object bnaya uske niche jo name nam ka variable tha vo public tha by default or usko value assign to thi hi baba yahooo usko sida derived class me call kiya bs value asign kiya baba yahoo or call kiya function sida bs😂

    • @Hardik_26922
      @Hardik_26922 18 днів тому

      yes same confusion mujhe bhi hue.
      but wo name property or base class ki private name property me difference hai.
      baba batana bhul gye the...

  • @jagjeetsingh1928
    @jagjeetsingh1928 2 роки тому

    much appreciate to you for explaining topic and not waste video time on just promotion

  • @Allinone-ml3hh
    @Allinone-ml3hh 3 роки тому

    bht hi bahtreen andaz ma samjhaya gaya ha is course ma.

  • @chauhanmanish4818
    @chauhanmanish4818 2 роки тому

    I think this is a best PHP course on youtube .

    • @YahooBaba
      @YahooBaba  2 роки тому +1

      Thanks for appreciating my work :)

    • @chauhanmanish4818
      @chauhanmanish4818 2 роки тому

      @@YahooBaba thankyou for reply sir ... we want more courses from you like Laravel , React js , node js etc.

    • @chauhanmanish4818
      @chauhanmanish4818 2 роки тому

      @@YahooBaba if you have any paid course of laravel then please share the link.

  • @harshitsareen2182
    @harshitsareen2182 4 роки тому +5

    I mean to make pages dynamic and interactive, it's appropriate to watch your js and jQuery series. Thanks

  • @luckyricky51
    @luckyricky51 3 роки тому +2

    Dear, Love this series and subscribing to your channel. Request you to make videos of advance Laravel tutorials.

  • @HANZALARAJPUT-ye4bv
    @HANZALARAJPUT-ye4bv Рік тому

    way of teaching is very good 😍

  • @mdhamid6956
    @mdhamid6956 4 роки тому +2

    Brother Love from Bangladesh💙💚💛 Hope you will make Php and Wordpress related full video course...We are waiting...Your video tutorial so much helpful

  • @omeshdewangan3352
    @omeshdewangan3352 4 роки тому +1

    Sir bootstrap ka bhi video bich me late rho tki oops ka practice krne ke liye time mil jaye... aur bootstrap pahle complete kr do taki jab hum oops ka project banaynge to bootstrap bhi pura samjh a jayega...frameworking me..

  • @EXPERIMENTSHOW.
    @EXPERIMENTSHOW. 9 місяців тому +1

    god bless you 🎉❤

  • @foreverVnews
    @foreverVnews 4 роки тому

    Great sir! Sir! Jab time mile to EK video online web site me kya kya changes karte hai BANANA.. Sir!
    I am waiting for that videos also..
    Thank you sir! Very much...

    • @YahooBaba
      @YahooBaba  4 роки тому +2

      Is topic par mein Detail course laane wala hun after Bootstrap

    • @foreverVnews
      @foreverVnews 4 роки тому

      @@YahooBaba wow! Sir! I am waiting sir! .. Mai boost rap bhi suru kar raha hu learn karna..
      Sir!
      Mai job less hu abhi.. Corona virus ke chakar me.. Hamari company band ho gayi hai.. Sir!
      Per apke ye saare course karke mai sochta hu. Koi website making ka kaam le lu.. Sir! .
      Sir! Ye bhi batana si kisi dusre ke liye website banayege to hum MySQL kon SA use karegen taki..
      HAME koi problem nahi nahi use jisne website banwai hai..
      Sir! I hope you help me.. To learn these types of information.. Sir!
      You are the best sir!

  • @rayhanrana6773
    @rayhanrana6773 3 роки тому +1

    marvelous explanation.

  • @probloggingtips4u105
    @probloggingtips4u105 3 роки тому +1

    Hello sir, very very thanks for these tutorials, these are very help full, sir please clear my doubt in php oop 4th tutorial on time 5:01 you told that private property can not access through derived class or outside class, but on end you access it by derived method.
    Please reply,
    And really appreciate for deliverance knowledge .

    • @aniketsingh1976
      @aniketsingh1976 2 роки тому

      Yes you're right brother. Please clear my doubt if you had cleared your doubt because your comment was 10 month older. Please reply 🙏

    • @maheshtirmali2052
      @maheshtirmali2052 2 роки тому

      It happen because that time new $name variable automatically created at time of assigning value which belongs to derived class (it does not have any relation with base class $name variable).
      Output:
      show Name : Mahesh
      Name : rahul
      25

  • @Adityasingh-k1p
    @Adityasingh-k1p 3 місяці тому

    such a nice video

  • @supergaming-sz9wy
    @supergaming-sz9wy 3 роки тому +5

    12:15 Why you are confusing? As you said we cannot access private property in derived class but how we are assigning the value to that private property using derived class object?

    • @maheshtirmali2052
      @maheshtirmali2052 2 роки тому +1

      It happen because that time new $name variable automatically created at time of assigning value which belongs to derived class (it does not have any relation with base class $name variable).
      Output:
      show Name : Mahesh
      Name : rahul
      25

    • @ego9890
      @ego9890 Рік тому

      @@maheshtirmali2052 very nicely explained, so you are telling that, at the time of assigning values to the object of derived class, those properties are getting made, right?

    • @Hardik_26922
      @Hardik_26922 18 днів тому

      baba explain karna bhul gye ki wo $name and base class ka $name diff. hai
      derived class me ek property create ho gy thi

  • @wick.programmer
    @wick.programmer Рік тому

    very well explained

  • @yeasinrahmansiam5594
    @yeasinrahmansiam5594 3 роки тому

    Thanks for the amazing video .Really Appreciateing

  • @sobanmughal35
    @sobanmughal35 Рік тому

    level ha bhai ap ka

  • @ranaarslan4750
    @ranaarslan4750 3 роки тому

    Good teaching method❤❤❤❤❤❤

  • @tnsobur1783
    @tnsobur1783 2 роки тому

    Great vid sir!

  • @tapandas9622
    @tapandas9622 4 роки тому

    Thank you for this oop php playlists. what would you do after this playlist?? can you please make a complete ecommerce project with OOP php. then it will be helpful.

  • @chintansuthar1544
    @chintansuthar1544 3 роки тому

    Thanks for the video

  • @laxmanchalaune9003
    @laxmanchalaune9003 Рік тому

    thank you so much sir

  • @EXPERIMENTSHOW.
    @EXPERIMENTSHOW. 9 місяців тому

    Thanx bro

  • @md.muhidislam9085
    @md.muhidislam9085 3 роки тому

    Awesome Boss

  • @dhruvkumar-br2lp
    @dhruvkumar-br2lp Рік тому

    thank you

  • @AkhileshYadav-lv3kh
    @AkhileshYadav-lv3kh 4 роки тому

    very nice video sir

  • @usmanarif9191
    @usmanarif9191 2 роки тому

    Hello, I am laravel developer since 2 years and I am doing programming since 5-6 years. today I thought to refresh my oop concepts and I love to watch your tutorials and way of explanation. I was watching your video. but suddenly at 12:40 you blow my mind. How can you access private property of parent through child object? I write same code as yours for confirmation and its work fine. How is it possible? even my compiler shows red underline but its working. Its not working with protected but with private its working. How ?????

    • @YahooBaba
      @YahooBaba  2 роки тому

      Yes in PHP the private variable is accessible but not in C++ or Java.

    • @usmanarif9191
      @usmanarif9191 2 роки тому

      @@YahooBaba I did some research on it and I found that private variables are not accessible. when we try to access private property then php automatically create dynamic property of class. we can through exception by using php __get magic method.

    • @maheshtirmali2052
      @maheshtirmali2052 2 роки тому

      It happen because that time new $name variable automatically created at time of assigning value which belongs to derived class (it does not have any relation with base class $name variable).
      Output:
      show Name : Mahesh
      Name : rahul
      25

  • @paulramura8126
    @paulramura8126 3 роки тому +1

    Very well done! ..... But, I did not get one thing. When PHP codes runs on the server and user only sees the HTML in their browsers, then what is the purpose of using Private and Protected access modifiers? I mean, from whom we are trying to keep the information Private and from whom we are trying to protect the properties and methods? Thank you!

    • @YahooBaba
      @YahooBaba  3 роки тому +1

      From Hackers

    • @paulramura8126
      @paulramura8126 3 роки тому

      @@YahooBaba Oh okay ...... Thank you for your reply! ......... Also, since this seems to be a security concern, so is it possible for you to make a video about how these hackers can access codes? I did not mean, how to hack codes but, instead, if we know what exactly they can see/read/do in/to our codes, then it can be very helpful to all of us. I bet this video will be a super duper hit as 100's of thousands of people are probably looking to find out the same answer.

    • @YahooBaba
      @YahooBaba  3 роки тому +2

      I already make a video that how hackers hack the website in PHP course. See the further video for that.

    • @paulramura8126
      @paulramura8126 3 роки тому

      @@YahooBaba Oh really! ....... You mean in this PHP OOP series?

    • @paulramura8126
      @paulramura8126 3 роки тому

      @@YahooBaba Could you please point out to the specific video? I tried checking your PHP videos but, could not find any video related to the hackers.

  • @Hackering-king
    @Hackering-king 14 днів тому

    Nice

  • @mehranlagharistudent2110
    @mehranlagharistudent2110 Рік тому

    intersting

  • @harshitsareen2182
    @harshitsareen2182 4 роки тому

    Hello sir, my query is related to your JavaScript and jQuery series which you have uploaded previously long ago, is it enough to follow js and jQuery videos to make front end website making or...... whatever you want to suggest me. please answer. Thanks.

    • @YahooBaba
      @YahooBaba  4 роки тому

      Yes this is complete course to make any website frontend.

    • @harshitsareen2182
      @harshitsareen2182 4 роки тому

      Thanks a lot for your reply

  • @kanuwebmedia8250
    @kanuwebmedia8250 4 роки тому

    Very awesome 👍👍👍👍 boss

  • @SushilKumar-ic1kv
    @SushilKumar-ic1kv 4 роки тому

    Nyc sir...agla video kb aayega...

  • @deepakultimatemovies2986
    @deepakultimatemovies2986 3 роки тому +1

    Laravel ki series start kriye sir

  • @FightAgainstMathsFear
    @FightAgainstMathsFear 4 роки тому +1

    SIR Please make a coding app for Android like vs code Editor 🙏🙏🙏🙏 Because you know everything

    • @YahooBaba
      @YahooBaba  4 роки тому +1

      Their are already so many editor for Android app development, so why are u asking me for that. Their is great quote "don't reinvent the wheel"...... i think u got my point.

    • @FightAgainstMathsFear
      @FightAgainstMathsFear 4 роки тому +1

      @@YahooBaba Sir You Don't understood my point
      I was asking you to make a coding app to code in android phone because I don't have Computer or laptop 😭
      And you also know everything Please 😄

    • @MuhammadAhmedLive
      @MuhammadAhmedLive 3 роки тому

      @@FightAgainstMathsFear search on playstore

  • @jagsv5164
    @jagsv5164 4 роки тому

    Sir name property which you are assigning value which is private in base class and you are assigned value to it on get () method in derived class so if we are assign value it to using derived class object so sir my question is that we can say that we are creating a new property $name for derived class or we are override it ?

    • @YahooBaba
      @YahooBaba  4 роки тому +1

      we are creating a new property $name for derived class

    • @jagsv5164
      @jagsv5164 4 роки тому

      @@YahooBaba thank you sir for clearing my doubt ☺

    • @khundkarujairulislam4302
      @khundkarujairulislam4302 3 роки тому

      @@YahooBaba and sir the access specifier for the new property $name in the derive class is public or private ?

  • @theplowshare2532
    @theplowshare2532 4 роки тому

    thank you sir
    sir app php ki funtional programing par projected demo bta dijiye

  • @_ArifulIslam
    @_ArifulIslam 4 роки тому

    sir after php oop and bootstrap.which topic you will start??

    • @YahooBaba
      @YahooBaba  4 роки тому +1

      GIT, Website Hosting, Advance JS

    • @_ArifulIslam
      @_ArifulIslam 4 роки тому

      ​@@YahooBaba thank you ,i am really waiting this important topics like Git and web hosting. and and advance JS.thank you so much sir.you are so great.

  • @saurabhshukla7344
    @saurabhshukla7344 4 роки тому

    Super

  • @umarvhora9818
    @umarvhora9818 2 роки тому +1

    SIR JAVA KI TUTORIAL BHI BANAYE

    • @YahooBaba
      @YahooBaba  2 роки тому

      Java aur React ke course bhi aane wale hai.

  • @Edgar--999
    @Edgar--999 3 роки тому +2

    1:33 plz tell me why you wrote?
    echo $this->name ;
    Is it necessary?

    • @ImproveProgrammingLogic
      @ImproveProgrammingLogic 3 роки тому

      Bro When you have to use Variable inside a function you will have to write this way $this->name

    • @yeasinrahmansiam5594
      @yeasinrahmansiam5594 3 роки тому

      whithout $this->name you cannot use $name inside function/method

    • @Edgar--999
      @Edgar--999 3 роки тому

      Ok thank YOU both

  • @ayushraj1224
    @ayushraj1224 4 роки тому

    Sir, Java script ka playlist completed hain na??

  • @afradbhuiyan384
    @afradbhuiyan384 4 роки тому

    Sir, I could not be searching on your website when I was trying to make any search it showed me this error
    that "Unable to load the requested file: single_page.php".Sir Would you please solve this problem ASAP?

  • @manishkushwaha-je6xy
    @manishkushwaha-je6xy 3 роки тому

    sir agar humne kisi property or method ko private kr diya to fir agar hum uski value ko dekhana chahte hai to fir kaise dekhenge

  • @kirtikirti5236
    @kirtikirti5236 4 роки тому +1

    bhaiya derived class se name kese change ho rha h? kyunki wo to private h in 12:25
    jb hum $b1->name='new name'; likh rhe to tb b name variable use ho rha na jo ki base class me private h.to access kese ho rha name ?? please bta dijiye ye doubt h mujhe

    • @pradeepbhartiya
      @pradeepbhartiya 2 роки тому +1

      $test->name = "boo yahoo"; -> it is public new property of derived class
      derived Object
      (
      [name:base:private] => yahoo boo // base class name property
      [name] => boo yahoo // it is new public property created for derived class object
      )

  • @hassanamanullah4251
    @hassanamanullah4251 Місяць тому

    💯

  • @billi3950
    @billi3950 2 роки тому

    Sir can you please share these slides which you are using. Or any other kind of documentation.

    • @YahooBaba
      @YahooBaba  2 роки тому +1

      All slides are available on our website. www.yahoobaba.net

    • @billi3950
      @billi3950 2 роки тому

      @@YahooBaba Thank you so much sir for your reply. but I can't be able to find slides on your website. I only see the code below each video which was quite helpful but I'm looking for the same slides which you are using in the videos. I also create an account on it but still never found them. I check all the tabs please can you share the exact URL from where I can get the slide. Thank you

    • @YahooBaba
      @YahooBaba  2 роки тому +1

      Slides are not free. These slides are for premium subscribers :
      www.yahoobaba.net/premium
      One more thing that all slides are available in PDF form.

    • @billi3950
      @billi3950 2 роки тому

      @@YahooBaba Done sir

  • @pratikagarwal1082
    @pratikagarwal1082 2 роки тому

    12:40 When a property $name is made private then it can't be access from outside ND derived class but how the name get changed/access when you changed name to baba Yahoo and try to access via derived class.
    Please explain!

    • @pradeepbhartiya
      @pradeepbhartiya 2 роки тому

      $test->name = "boo yahoo"; -> it is public new property of derived class
      derived Object
      (
      [name:base:private] => yahoo boo // base class name property
      [name] => boo yahoo // it is new public property created for derived class object
      )

  • @AvadheshKumar-es7hz
    @AvadheshKumar-es7hz 4 роки тому

    sir codeigniter par video kab karenge?

  • @EdifyShare
    @EdifyShare 2 роки тому

    Agar ham access modifier ko private set kr dety hen or usmy function ko bhi private hi set kar dety hen ab ham usko print krwana chahy to kesy krwaye gy 🤔 agar hamy usmy se kuch bi lekr ana he to jab tk wo chez call hi nhi hogi ham usky andr ka data laye gy kesy or agr ham andr hi se usko print krwa dety hen to wo automatically data dega kesy??

  • @nishanirav4304
    @nishanirav4304 2 роки тому

    At @2:12
    class B extends A
    Not class B extends class A

  • @Hardik_26922
    @Hardik_26922 18 днів тому

    don't confuse at 12:34

  • @g.1derived86
    @g.1derived86 2 роки тому

    how can you change value of private property 'name' outside the class ?

    • @g.1derived86
      @g.1derived86 2 роки тому

      i also have the same confusion.

  • @satyamsinghofficial3062
    @satyamsinghofficial3062 4 роки тому

    sir free m html css course ki certificate kon si website pe mil jaegi

    • @ayushraj1224
      @ayushraj1224 4 роки тому +1

      Solo learn pe course complete krne pe.....
      Or, apne se certificates bna bhi skte hoo.....

    • @YahooBaba
      @YahooBaba  4 роки тому +2

      I don't know about this but nobody see your certificates in Job interview... thats my 16 year of experience.

    • @satyamsinghofficial3062
      @satyamsinghofficial3062 4 роки тому

      @@YahooBaba okk sir

  • @monucool2570
    @monucool2570 4 роки тому

    Security issue kaise hoga? php to server mein run hota hai...

    • @YahooBaba
      @YahooBaba  4 роки тому

      Dear pehli baat toh Hackers server he hack karte hai. Doosri baat main waise security ki baat nahi kar rha hun... mere kehne ka matlab hai ki jab bade project bante hai toh usmein 1 or 2 bande kaam nahi karte usmein 50, 100, 200 bande bhi ho sakte hai means DEVELOPERS toh kiss method ka access kisko dena hai aur kisko nahi yeh sab pehle he decide karna padta hai.

  • @vinodverma-ui2ct
    @vinodverma-ui2ct 2 місяці тому

    nhi hua sir derived class se name

  • @adeelanjum8880
    @adeelanjum8880 3 роки тому +2

    As you said in Private Access Modifier properties and methods cannot be accessed from outside class and even not from the derived class.
    But how you changed the value of variable $name from Yahoo baba to baba yahoo by accessing the $name variable using derived class and it was also outside the class?
    $name is private
    You created a derived class named derived. You created its object named test.
    Then using that test object you accessed $name variable and changed its value even it was outside the class. This was too confusing.

    • @pradeepbhartiya
      @pradeepbhartiya 2 роки тому

      $test->name = "boo yahoo"; -> it is public new property of derived class
      derived Object
      (
      [name:base:private] => yahoo boo // base class name property
      [name] => boo yahoo // it is new public property created for derived class object
      )

    • @g.1derived86
      @g.1derived86 2 роки тому +1

      i also have same confusion.

  • @codeknowithrlv
    @codeknowithrlv Рік тому

    sir aap video ko uska number likha karo

    • @YahooBaba
      @YahooBaba  Рік тому

      Sabhi video ka number uske thumbnail pe diya hua hai. Check the lower left corner of the thumbnail.

  • @RanaAdnan-b5v
    @RanaAdnan-b5v 3 місяці тому

    Why child class object is able to set private property of parent class here in below code in PHP?
    In below programs
    Why child class object set the private property without any error?
    Why same is shown ?
    The behavior you're describing seems to be related to a misunderstanding of how PHP handles properties and the creation of new properties on an object. In PHP, when you attempt to access or modify a property that doesn't exist in the object's class definition, PHP will dynamically create that property on the object at runtime. This does not modify the private property in the parent class but rather creates a new public property on the instance of the child class.
    Here's the detailed explanation:
    ### Original Code
    ```php
    ```
    ### What Happens Internally:
    1. **Private Property**: The `base` class has a private property `$name` initialized to `"Rana"`.
    2. **Child Class**: The `child` class extends `base` but does not have access to the private property `$name` of `base` directly.
    3. **Dynamic Property Creation**:
    - When you do `$child->name = "Adnan";`, PHP does not find a `public` or `protected` property named `name` in the class hierarchy of `child`.
    - PHP then dynamically creates a new `public` property `name` on the `$child` instance.
    4. **Accessing the Property**:
    - `echo $child->name;` accesses the new dynamically created public property `name` on the `$child` instance, which contains `"Adnan"`.
    ### Important Points:
    - **Private Properties**: Private properties are only accessible within the class they are declared in. They are not accessible or modifiable by child classes or outside the class.
    - **Dynamic Properties**: PHP allows dynamic properties, meaning you can add new properties to an object instance at runtime even if they are not defined in the class.
    ### Demonstration:
    To demonstrate that the private property in the parent class remains unaffected and that a new property is being created on the child instance, consider the following modified example:
    ```php
    ```
    ### Output:
    ```
    Public Property: Adnan
    Private Property: Rana
    ```
    ### Explanation:
    - **Public Property**: `"Adnan"` is stored in the dynamically created public property `name` on the `$child` object.
    - **Private Property**: The private property `$name` in the `base` class remains `"Rana"` and is accessed using the `getPrivateName` method.
    ### Summary:
    - The child class object can set and get a dynamically created public property without any error.
    - The private property in the parent class remains private and unchanged, demonstrating encapsulation.
    - This behavior occurs because PHP allows dynamic property creation at runtime when an undefined property is accessed or modified on an object.

  • @ansarihifzurrahman2683
    @ansarihifzurrahman2683 3 роки тому

    I got trouble : yout put class A extends class B {} a wrong syntax by you. I thought this was right but after an hour I found this. We follow your programming do not do this.

  • @shivamgpt651
    @shivamgpt651 4 роки тому

    what happens when constructor is private?

  • @COFFY_GAMING
    @COFFY_GAMING Рік тому

    Very helpful playlist 🎉❤

  • @Adityasingh-k1p
    @Adityasingh-k1p 3 місяці тому

    thanku so much sir