PHP 8.5.0 Beta 1 available for testing

Voting

: max(nine, zero)?
(Example: nine)

The Note You're Voting On

aidan at php dot net
20 years ago
To check if a function was called statically or not, you'll need to do:

<?php
function foo () {
$isStatic = !(isset($this) && get_class($this) == __CLASS__);
}
?>

More at (http://blog.phpdoc.info/archives/4-Schizophrenic-Methods.html).

(I'll add this to the manual soon).

<< Back to user notes page

To Top