[php-src] Issue #7739: add creating object constructor from Jason
Issue: https://github.com/php/php-src/issues/7739
Author: loveyandex
### Description
add this signature and syntax to PHP core to enjoy developer from fast developing
```
class MyObject{
__json_constructor( {"AdditionAmount": 0 // default value,
"CashRegisterDeviceRef": null,
"CustomerAddressRef": null,
"DeliveryDesc": "",
"Description": null,
"DeviceReceiptCode": null,
"DocumentRef": 0,
"EffectiveNetPrice": 11678899,
"ExcludedPolicies": "",
"Fee": 11678899.000000,
"FreeProductBusinessPolicyConditionRowRef": null,
"FreeProductBusinessPolicyRef": null,
"HasReservation": false,
})
}
//create new that instance :
$obj= new MyObject({"AdditionAmount": 0,
"CashRegisterDeviceRef": null,
"CustomerAddressRef": null,
"DeliveryDesc": "",
"Description": null,
"DeviceReceiptCode": null,
"DocumentRef": 0,
"EffectiveNetPrice": 11678899,
"ExcludedPolicies": "",
"Fee": 11678899.000000,
"FreeProductBusinessPolicyConditionRowRef": null,
"FreeProductBusinessPolicyRef": null,
"HasReservation": false,
})
```
Thread (1 message)
- noreply@php.net