Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

static variable defined in function

Mon Oct 27, 2008 5:54 pm

Code:

<?php
  increment
();
  
increment ();
  
increment ();
  function
increment (){
      static
$a=0;
      echo
$a;
      
$a++;
  }    
  
?>




Post a reply
  Related Posts  to : static variable defined in function
 Calling a local variable from a static function     -  
 difference between a static and a non-static inner class     -  
 different between Local variable and Global variable     -  
 Create User Defined Folder[directory] in C++[Turbo C++]     -  
 What is a static method     -  
 Static Import     -  
 Class static properties     -  
 Static Methods and Variables     -  
 static vs fixed div position     -  
 Can we override static methods in java     -  

Topic Tags

PHP Variables