Skip to content

Instantly share code, notes, and snippets.

@minte9
Last active April 14, 2021 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minte9/21894b8a442f6677a98347b970fd566a to your computer and use it in GitHub Desktop.
Save minte9/21894b8a442f6677a98347b970fd566a to your computer and use it in GitHub Desktop.
<?php
/**
* Define getMaxValue() method
* Use static syntax
*/
class MyClass {
const MAX_VALUE = 100;
/**
* SOLUTION
*/
public static function getMaxValue() {
return self::MAX_VALUE;
}
}
echo MyClass::getMaxValue(); // 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment