Q:

php increment a number in static constructor

I need to increment a number in constructor of a class, without calling static functions. My code is as follows:
class Addup {

static public $num;

function __construct($num) {
  echo 'My number is==>' . $num;
  static::$num++;
  }
}

$inc = new Addup();//instantiated an object
echo '<br>';
echo $inc::$num;//should be 2, but still 1, should it be $inc = new     Addup() or $inc->addup() implemented in my class?
echo '<br>';
echo $inc::$num;//should be 3, but still 1
echo '<br>';
echo $inc::$num;//should be 4, but still 1

Any ideas would be welcome, Thank you
UPD made the following refactoring:
$inc = new Increment();//My number is==>2
echo '<br>';
$inc = new Increment();//My number is==>3
echo '<br>';
$inc = new Increment();//My number is==>4
echo '<br>';
$inc = new Increment();//My number is==>5

Is this the only way to do that without calls to functions in a class?

A:

A static property means that the value of the static property will be the same across multiple instantiations of the class.
This may demonstrate whats happening with your code better than your example
Side Note: The parameter you were passing had no effect on anything and was doing nothing
<?php
class Addup {

    static public $num;

    function __construct() {
        static::$num++;
    }
}

$inc1 = new Addup();   // calls the constructor therefore +1
echo PHP_EOL;
echo $inc1::$num; // 1

$inc2 = new Addup();   // calls the constructor therefore +1
echo PHP_EOL;
echo $inc2::$num; // 2

$inc3 = new Addup();   // calls the constructor therefore +1
echo PHP_EOL;
echo $inc3::$num; // 3

// now if you look at $inc1::$num; after instantiating inc2 and inc3
echo PHP_EOL;
echo $inc1::$num; // NOT 1 but whatever it was last incremented to i.e. 3

