I create a class abc and static variable and two function having name setsize in which I set a value and another function I create a getsize to get value in getsize function I increment a value when I call a function its output must be 101 but it output is 100 why
<?php
Class abc { // create a class
public static $a;
static function getsize() { make a function
return self::$a++; //increment a static variable
}
static function setsize($n) {
self::$a=$n; // set size of static variable
}
}
abc::setsize(100); // set value of static variable
echo abc::getsize(); //call getsize function output is 100 but it must be
101