kphp icon indicating copy to clipboard operation
kphp copied to clipboard

KPHP — a PHP compiler

Results 277 kphp issues
Sort by recently updated
recently updated
newest added

In PHP there are [**prepared statements**](https://www.php.net/manual/en/pdo.prepared-statements.php) to speed up and simplify the work with PDO Example: ```php $request = $db->prepare('SELECT * FROM issues WHERE likes < :likes AND author =...

enhancement
runtime
missing functionality

Main issue: https://github.com/VKCOM/kphp/issues/290 This patch implements nullsafe operator `?->` for methods and properties. RFC: https://wiki.php.net/rfc/nullsafe_operator

PHP8

1. Fixed links that were entered on 404 pages 2. Changed the links from Russian to English documentation

documentation

PDO драйвер в новом KPHP за 11.2020, хотя бы для MySQL (и SQLite)

Following code: ```php var_export(unpack('H*', '')); ``` In PHP 7.4 it returns an empty string which is OK: ```php array ( 1 => '', ) ``` In KPHP it returns `false`...

differs from PHP

```php _main(); function _main() { /** @var I $i */ $i = new A(42); instance_serialize($i); } interface I {} /** @kphp-serializable */ class A implements I{ /** @kphp-serialized-field 1 */...

enhancement

If `instance_serialize` accepts `$this` in method inherited from abstract class, then all fields of child class are just ignored. Code to reproduce: ```php $b = new B(42, 'hello, world!'); $b->serialize();...

enhancement

substr — Return part of a string ```php substr(string $string, int $offset, ?int $length = null): string ``` Before PHP 8.0 if substr is empty, returns false ```php substr("abcdef", 4,...

differs from PHP

In PHP 7.1, function `strpos` can accept the negative parameter `offset`. Link: https://www.php.net/manual/ru/function.strpos.php ### PHP function ```php strpos(string $haystack, string $needle, int $offset = 0): int|false ``` ### Current behavior...

differs from PHP