<?php
/**
 * https://github.com/php/php-src/pull/1026
 * https://wiki.php.net/rfc/incompat_ctx
 */
class A
{
    function bNon()
    {
        //i'm not interested in this
        echo "A::bNon\n";
    }

    static function cStat()
    {
        if (isset($this)) {
            //static method has been called non-statically
            //$this is instance of A
            echo "$a->cStat\n";
        } else {
            //static method has been called statically
            echo "A::cStat\n";
        }
    }
}

//this should fail, that's fine
A::bNon();

//but this should work both:
A::cStat();
$a = new A();
$a->cStat();

?>