<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to use inheritance in php Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/how-to-use-inheritance-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/how-to-use-inheritance-in-php/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Thu, 07 Oct 2021 11:33:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>PHP OOP : Inheritance</title>
		<link>https://www.scmgalaxy.com/tutorials/php-inheritance/</link>
					<comments>https://www.scmgalaxy.com/tutorials/php-inheritance/#respond</comments>
		
		<dc:creator><![CDATA[vikashdev k]]></dc:creator>
		<pubDate>Wed, 06 Oct 2021 06:20:14 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[example of inheritance in php]]></category>
		<category><![CDATA[explain main and derived class]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[how to use inheritance in php]]></category>
		<category><![CDATA[Perforce]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[php inheritance]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[scmGalaxy DevOps Training Online]]></category>
		<category><![CDATA[scmgalaxy php]]></category>
		<category><![CDATA[scmGalaxy Tutorials]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[What]]></category>
		<category><![CDATA[what is inheritance in php]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=9422</guid>

					<description><![CDATA[<p>What is inheritance in php? Inheritance is properties of PHP. Accessing the feature of one class of another class. Three [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/php-inheritance/">PHP OOP : Inheritance</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is inheritance in php?</h3>



<ul class="wp-block-list"><li>Inheritance is properties of PHP.</li><li>Accessing the feature of one class of another class.</li><li>Three types that is single, multiple and multilevel inheritance.</li><li>It is the four pillars of oops.</li><li>It allows a class to reuse the code from another class without duplicating it.</li><li>Two classes one is base/main another one is derived class.</li><li>Base class only use its own function but in Derived class it use both function base or derived class.</li></ul>



<h3 class="wp-block-heading">How to use inheritance in php?</h3>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
class school {
}
class students extends school {
}
$sch =new school (); // only use class school 
$stu = new students (); // use both class school students (properties and methods)
</pre></div>


<h3 class="wp-block-heading">Example of main/base class use :-</h3>



<script src="https://gist.github.com/vikash-cotocus/1f7b68919052d8717b7ca3b533760172.js"></script>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="523" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3-1024x523.png" alt="" class="wp-image-9424" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3-1024x523.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3-300x153.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3-768x392.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3-1536x784.png 1536w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php3.png 1638w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Example of inheritance:</h3>



<script src="https://gist.github.com/vikash-cotocus/2ff225a54be4148e3799012c82393c72.js"></script>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="607" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php4-1024x607.png" alt="" class="wp-image-9428" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php4-1024x607.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php4-300x178.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php4-768x455.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/10/php4.png 1520w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/php-inheritance/">PHP OOP : Inheritance</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/php-inheritance/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
