متغیر ها و توابع static در PHP :
PHP:
<?php
class My_Class{ static $name="noorgram.ir is for tutorial\n"; static function action() { echo "PHP is easy!!\n"; }
}
My_Class::action();
echo My_Class::$name;
$obj=new My_Class();
$obj->action();
echo $obj::$name;
?>
HTML:
PHP is easy!!
noorgram.ir is for tutorial
PHP is easy!!
noorgram.ir is for tutorial