Re: Vers 8.x compatibility
| From: | Andrey Repin | Date: | Tue, 09 Mar 2021 05:47:13 +0000 |
| Subject: | Re: Vers 8.x compatibility | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327507@lists.php.net to get a copy of this message | ||
Greetings, JEFFRY KILLEN.
In reply to Your message dated Sunday, March 7, 2021, 7:07:43,
> 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?
Test this, it's easy.
> I assume that static methods have to be declared as such
Yes.
> or am I misunderstanding ’static’ methods?
> I seem to remember the use of $this in a method makes the method not
> static.
Nope.
> I define all of the methods I write in such a way that they never
> rely on $this or non static variables.
Why, the hell?
> 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?
There's a manual page, as with about any other properly formatted PECL
extension.
http://php.net/v8js
> It appears that it essentially does eval on js code strings and shares the
> result with php. Am I on the right track?
See https://pecl.php.net/package/v8js for more info.
--
Sincerely Yours, Andrey Repin <anrdaemon@freemail.ru>