K
K
khodos_dmitry2020-06-20 21:48:01
PHP
khodos_dmitry, 2020-06-20 21:48:01

How to set a default value for a static variable?

It is clear that you can do this: And if the expression should be the default value?
public static $var = 25;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2020-06-20
@khodos_dmitry

public static $var = 25;and is the "default value" .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question