[ create a new paste ] login | about

Link: http://codepad.org/DdLiH0Bn    [ raw code | output | fork ]

PHP, pasted on Jan 11:
<?php
class islemler
	{
		public static $sayi1 = 50;
		public static $sayi2 = 20;
		public static function topla()
		{
				echo self :: $sayi1+self :: $sayi2;
		}
		
	}
	
	class islemler2 extends islemler
	{
		static function topla()
		{
				echo parent :: $sayi1*parent :: $sayi2;
		}
		static function fark() 
		{
				echo parent :: $sayi1-parent :: $sayi2;
		}
	}
	
	echo islemler :: topla();
?>


Output:
1
70


Create a new paste based on this one


Comments: