Ik heb laatst een code gekregen van iemand. Bij die code zat een class waarin stond static $var;. Kan iemand me uitleggen waar static voor staat?
php class
Normaal gesproken moet je om een class te gebruiken dit doen:
Als je er iets inzet wat static is hoef je dat niet te doen dan doe je dit:
[COLOR= #0000BB]<?php
$class_gebruiken[/COLOR] [COLOR= #007700]= new[/COLOR] classnaam[COLOR= #007700]();[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$class_gebruiken[/COLOR][COLOR= #007700]->var;[/COLOR]
?> Als je er iets inzet wat static is hoef je dat niet te doen dan doe je dit:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] classnaam[COLOR= #007700]:[/COLOR][COLOR= #007700]:[/COLOR][COLOR= #0000BB]$var[/COLOR][COLOR= #007700];[/COLOR]
?> Bedankt, snap het helemaal.
Graag gedaan 
