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

Issue: https://github.com/VKCOM/kphp/issues/290 RFC: https://wiki.php.net/rfc/match_expression_v2 Idea: Convert `match` into switch but using `eq3` instead of `eq2`. - [x] New keyword - [x] New AST nodes(`op_match_proxy, op_match_default, op_match_case`) - [x] Change `op_switch`...

PHP8

This PR adds enumerations(https://wiki.php.net/rfc/enumerations). The list of implemented and requested php8 features - https://github.com/VKCOM/kphp/issues/290 Previous attempt - https://github.com/VKCOM/kphp/pull/730

PHP8

Внутри класса A регистрирую коллбек в виде анонимной функции, в нём выполняется метод класса A. Одним из свойств класса A является экземпляр класса B, в классе B нет свойств. При...

https://www.php.net/manual/en/function.array-udiff.php Now we have `array_diff(a, b)` function. But it requires that array internal type must be convertible to string. This functions allows to add user-defined comparator.

missing functionality

Assume we have the following class hierarchy: ![image](https://github.com/VKCOM/kphp/assets/66915223/99cd11e4-dcec-4850-ae62-b078434f46bb) There is a a possible situation when such a hierarchy cannot be compiled. For example, if in any C++ Translation Unit inclusion...

bug

The ability to set automatic event handlers via functions is needed to fully work with HTTP/2 . Particularly, support of the following options for `curl_setopt()`: 1. CURLOPT_HEADERFUNCTION 2. CURLOPT_PASSWDFUNCTION 3....

In case of ```php $a = new A(CONST_ONE, CONST_TWO); $b = new A(CONST_ONE, CONST_TWO); ``` we want 1. Constructor of class `A` with parameters `CONST_ONE, CONST_TWO` to be called once...

enhancement
optimization

For example: 1. I add new `phpt` file with the following path: `tests/phpt/constants/006_object_as_class_const.php`. 2. Then I do `$ ./kphp_tester.py 006_object_as_class_const.php`. 3. After that, I see `Can't find any tests with...

bug

Now all the steps have exit code 1. In a good way, we need to separate the steps with different error codes: `KPHP`, `g++` and `ld`

enhancement
refactoring