Vers 8.x compatibility
| From: | JEFFRY KILLEN | Date: | Sun, 07 Mar 2021 04:07:43 +0000 |
| Subject: | Vers 8.x compatibility | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327506@lists.php.net to get a copy of this message | ||
Hello:
php v 8.x questions
https://www.php.net/manual/en/migration80.incompatible.php
The ability to call non-static methods statically has been removed.
Thus is_callable() will fail when checking for a non-static method
with a classname (must check with an object instance).
Q: does this mean that calling a class method with self::methodName() from within the class will
not work?
I assume that static methods have to be declared as such or am I misunderstanding ’static’
methods?
I seem to remember the use of $this in a method makes the method not static. I define all of the
methods I write in such a way that they never rely on $this or non static variables.
One other question:
In Googling php v8 I came up with a reference to the v8js. This is the first time I have encountered
it.
Is there a publication that will address it in greater depth than I could find on the php manual
pages?
It appears that it essentially does eval on js code strings and shares the result with php. Am I on
the
right track?
Thanks for time and attention
JK