Re: Vers 8.x compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your reply, Andrey;

> On Mar 8, 2021, at 9:47 PM, Andrey Repin <anrdaemon@xxxxxxxxxxx> wrote:
> 
> 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 don’t have a php version 8x installation yet to test with.

Up to now that is the way I have been programming.
I generally have one public method that reads $_GET or $_POST vars and calls
the appropriate member methods with self:methodName() and then returns whatever
the self::memberName() call returns.

The classes I define are generally tightly coupled with user interface that is largely
managed by javascript. The javascript sanitizes the input before sending sync or
async queries.

But I would expect there are lots of criticisms and questions to be sent my way.
> 
>> 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.
Nope: I am not misunderstanding static methods
or
nope: $this does not make a method non static?
> 
>> 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?
That is just the way I have been doing it.
with private static variables I can reference them with ‘self::varName'
> 
>> 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@xxxxxxxxxxx>
> 




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux