CodeLobster IDE
http://codelobster.com/forum/

Need PHP 8
http://codelobster.com/forum/viewtopic.php?f=8&t=24931
Page 1 of 1

Author:  Guest [ Sat Jan 16, 2021 2:40 pm ]
Post subject:  Need PHP 8

I need tu use PHP 8 in a new project.
Can this be done in CodeLobsterIDE? It is very important to me (and urgent).
Thanks a lot !

Author:  Admin [ Mon Jan 18, 2021 7:00 am ]
Post subject:  Re: Need PHP 8

Hi.

What functions are not shown for You?
Codelobster uses last version on PHP online help.

Thanks,
Codelobster Team.

Author:  Guest [ Mon Jan 18, 2021 9:49 am ]
Post subject:  Re: Need PHP 8

[code]
public function foo(Foo|Bar $input): int|float;

public function foo(Foo|null $foo): void;

public function bar(?Bar $bar): void;

$dateAsString = $booking->getStartDate()?->asDateTimeString();

class CustomerData
{
public function __construct(
public string $name,
public string $email,
public int $age,
) {}
}

$data = new CustomerData(
name: $input['name'],use App\Attributes\ExampleAttribute;

#[ExampleAttribute]
class Foo
{
#[ExampleAttribute]
public const FOO = 'foo';

#[ExampleAttribute]
public $x;

#[ExampleAttribute]
public function foo(#[ExampleAttribute] $bar) { }
}
email: $input['email'],
age: $input['age'],
);

$result = match($input) {
0 => "hello",
'1', '2', '3' => "world",
};

class Money
{
public function __construct(
public Currency $currency,
public int $amount,
) {}
}

class Foo
{
public function test(): static
{
return new static();
}
}

$triggerError = fn () => throw new MyError();

$foo = $bar['offset'] ?? throw new OffsetDoesNotExist('offset');

class Foo
{
private WeakMap $cache;

public function getSomethingWithCaching(object $obj): object
{
return $this->cache[$obj]
??= $this->computeSomethingExpensive($obj);
}
}

$foo = new Foo();

var_dump($foo::class);

try {
// Something goes wrong
} catch (MySpecialException) {
Log::error("Something went wrong");
}

DateTime::createFromInterface(DateTimeInterface $other);

DateTimeImmutable::createFromInterface(DateTimeInterface $other);


[/code]

AND SO ON.

IT IS ABOUT PHP 8 (eight), not 7.

YOU have to develop new internal parser for this version (PHP 8) that will support all php features 1:1, YOU have to update CodeInsight, docs, php standard definitions, debugger, refresh all the libraries depend on.

Author:  Admin [ Fri Jan 29, 2021 10:48 pm ]
Post subject:  Re: Need PHP 8

Hi.

Do You mean Error Window?

Yes, it doesn't process PHP 8 syntax yet.
We are going to update it soon surely.

Thanks,
Codelobster Team.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/