Hi Andrea, Sebastian

2017-07-06 1:12 GMT+02:00 Andrea Faulds <a...@ajf.me>:
> Hi Sebastian,
>
> Sebastian Bergmann wrote:
>>
>> Is it intentional that the DOUBLE_COLON operator can be used on a
>> variable that contains a reference to an object?
>
>
> I assume so. It wouldn't be the only place that accepts either a class name
> or an object of that class.

Thinking about it, couldn't this have been a side effect of the
"Dynamic access to static methods", available as of PHP 5.3:

<?php
class C {
   public static $foo = 123;
}

$a = "C";
echo $a::$foo;
?>


-- 
regards,

Kalle Sommer Nielsen
ka...@php.net

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to