Thursday, 31 March 2016

PHP The static Keyword

<?php
function myTest() {
    static $x = 0;
    echo $x;
    $x++;
}

myTest();
myTest();
myTest();
?>

0 comments:

Post a Comment