❤❤❤ 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
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 🙏
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.🙏🙏🙏
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😂
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..
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 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!
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 .
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
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?
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
@@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?
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.
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 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.
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
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 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.
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.
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.
@@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 😄
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 ?
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?
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
$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 )
@@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
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!
$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 )
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??
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.
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.
$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 )
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.
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.
❤❤❤ 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
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 🙏
Glad it helped! .... Your welcome :)
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.🙏🙏🙏
All the best
@@YahooBaba thanks , and I'm following your free projects for gaining more techniques of coding.
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😂
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...
much appreciate to you for explaining topic and not waste video time on just promotion
Thanks and welcome :)
bht hi bahtreen andaz ma samjhaya gaya ha is course ma.
Thanks and welcome :)
I think this is a best PHP course on youtube .
Thanks for appreciating my work :)
@@YahooBaba thankyou for reply sir ... we want more courses from you like Laravel , React js , node js etc.
@@YahooBaba if you have any paid course of laravel then please share the link.
I mean to make pages dynamic and interactive, it's appropriate to watch your js and jQuery series. Thanks
Dear, Love this series and subscribing to your channel. Request you to make videos of advance Laravel tutorials.
way of teaching is very good 😍
Glad you think so!
Brother Love from Bangladesh💙💚💛 Hope you will make Php and Wordpress related full video course...We are waiting...Your video tutorial so much helpful
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..
Yes sure
god bless you 🎉❤
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...
Is topic par mein Detail course laane wala hun after Bootstrap
@@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!
marvelous explanation.
Glad you liked it
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 .
Yes you're right brother. Please clear my doubt if you had cleared your doubt because your comment was 10 month older. Please reply 🙏
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
such a nice video
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?
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
@@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?
baba explain karna bhul gye ki wo $name and base class ka $name diff. hai
derived class me ek property create ho gy thi
very well explained
Thanks for liking
Thanks for the amazing video .Really Appreciateing
Thanks and welcome :)
level ha bhai ap ka
😀
Good teaching method❤❤❤❤❤❤
Thanks for liking
Great vid sir!
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.
Laravel
Thanks for the video
Your welcome
thank you so much sir
Most welcome
Thanx bro
Awesome Boss
thank you
very nice video sir
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 ?????
Yes in PHP the private variable is accessible but not in C++ or Java.
@@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.
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
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!
From Hackers
@@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.
I already make a video that how hackers hack the website in PHP course. See the further video for that.
@@YahooBaba Oh really! ....... You mean in this PHP OOP series?
@@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.
Nice
intersting
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.
Yes this is complete course to make any website frontend.
Thanks a lot for your reply
Very awesome 👍👍👍👍 boss
Your welcome :)
Nyc sir...agla video kb aayega...
Laravel ki series start kriye sir
SIR Please make a coding app for Android like vs code Editor 🙏🙏🙏🙏 Because you know everything
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.
@@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 😄
@@FightAgainstMathsFear search on playstore
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 ?
we are creating a new property $name for derived class
@@YahooBaba thank you sir for clearing my doubt ☺
@@YahooBaba and sir the access specifier for the new property $name in the derive class is public or private ?
thank you sir
sir app php ki funtional programing par projected demo bta dijiye
sir after php oop and bootstrap.which topic you will start??
GIT, Website Hosting, Advance JS
@@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.
Super
SIR JAVA KI TUTORIAL BHI BANAYE
Java aur React ke course bhi aane wale hai.
1:33 plz tell me why you wrote?
echo $this->name ;
Is it necessary?
Bro When you have to use Variable inside a function you will have to write this way $this->name
whithout $this->name you cannot use $name inside function/method
Ok thank YOU both
Sir, Java script ka playlist completed hain na??
Yes
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?
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
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
$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
)
💯
Sir can you please share these slides which you are using. Or any other kind of documentation.
All slides are available on our website. www.yahoobaba.net
@@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
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.
@@YahooBaba Done sir
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!
$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
)
sir codeigniter par video kab karenge?
After PHP and Laravel ...I will start Codeigniter
Thank u sir.
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??
At @2:12
class B extends A
Not class B extends class A
don't confuse at 12:34
how can you change value of private property 'name' outside the class ?
i also have the same confusion.
sir free m html css course ki certificate kon si website pe mil jaegi
Solo learn pe course complete krne pe.....
Or, apne se certificates bna bhi skte hoo.....
I don't know about this but nobody see your certificates in Job interview... thats my 16 year of experience.
@@YahooBaba okk sir
Security issue kaise hoga? php to server mein run hota hai...
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.
nhi hua sir derived class se name
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.
$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
)
i also have same confusion.
sir aap video ko uska number likha karo
Sabhi video ka number uske thumbnail pe diya hua hai. Check the lower left corner of the thumbnail.
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.
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.
what happens when constructor is private?
Very helpful playlist 🎉❤
thanku so much sir