Re: [PHP-DEV] intersection types and null for defaults, properties and return types

2021-07-19 Thread azjezz
Hello, I personally don't consider a bug, but an expected behavior. when writing: ``` T $x = null ``` it is the same as writing: ``` T|null $x = null ``` or ``` ?T $x = null ``` however, when `T` is an intersection between `X` and `T` ( `X` ), `X $x = null` becomes `null|X $x = null`,

[PHP-DEV] [discussion] arraykey type

2019-04-26 Thread azjezz
://docs.hhvm.com/hack/types/arraykey - https://github.com/php/php-src/pull/4073#issuecomment-487178779 -https://github.com/php/php-src/pull/2603#issuecomment-487122061 - https://twitter.com/azjezz/status/1121182765385433095 - https://www.facebook.com/groups/2204685680/?multi_permalinks=10157789745805681 GitHub

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-23 Thread azjezz
` : `function check(mixed $var, typename $type): T` Cheers, - Saif Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, April 23, 2019 11:51 AM, Andrey Hristov wrote: > Hi, > On 23.04.19 г. 13:44 ч., azjezz wrote: > > > Hello Dan, > > I don' think th

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-23 Thread azjezz
Hello Dan, I don' think this a problem relating to just one use case, some PHP builtin functions have weird union return types, where static analysis tools would warn you about the return type being `string|bool`, when you are expecting `string`. using type constrain : ``` $foo = substr($foo,

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-23 Thread azjezz
Hello Nikita, I would love to hear your opinion on the `as` syntax from Hack, and whether it can be used in PHP the same way or would it be an issue. Cheers, - Saif Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Tuesday, April 23, 2019 10:16 AM, Nikita Popov wrote:

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-22 Thread azjezz
I think we would be talking about typed variables at that point. ( something you can do with PHP 7.4 http://github.com/azjezz/typed ) even though `as` is used with `foreach`, i don't think it would be an issue to use it for something else, but i think i will leave that to someone who's more

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-22 Thread azjezz
Hello Ben. yes, i have made a gist with a simple example to show the `as` operator usage in hack + HHVM ( 4.1.0 ) output. see : https://gist.github.com/azjezz/03955ff2b009f1ced22ce68c9a862847 Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message

Re: [PHP-DEV] Object Type Casting Reloaded

2019-04-22 Thread azjezz
Hello, Internals. I have been using HackLang for quite a while now and i believe they have a better solution for this, and it would awesome to see it in PHP, the `as` operator. see : https://docs.hhvm.com/hack/expressions-and-operators/as --- when i see : ``` $foo = (Foo) $object; ``` i

Re: [PHP-DEV] [RFC] JIT

2019-02-16 Thread azjezz
weeks i have been mainly using hack-lang and the attributes API has changed as of 3.29 ( https://hhvm.com/blog/2018/10/22/hhvm-3.29.html - change actually landed on 4.0 instead ) and i think its a good approach that php can take too. I have no experience with C so i don't know how this

Re: [PHP-DEV] New website for the PHP project

2019-02-07 Thread azjezz
Hello Bohwaz, i think you should take a look at the mock ups[1]. I don't plan on using an JS Framework, the frameworks i suggested are lightweight CSS Frameworks. I'm also planning on keeping the shortcut redirects and maybe even improve them. [1]: https://github.com/azjezz/web-php-mock-ups

[PHP-DEV] Re: [PHP-WEBMASTER] Re: [PHP-DEV] New website for the PHP project

2019-02-05 Thread azjezz
On Tuesday, February 5, 2019 8:51 PM, Rowan Collins wrote: > On 05/02/2019 17:32, Tom Worster wrote: > > > I have two suggestions, assuming you proceed roughly as outlined in > > your original post. > > > > 1. Start with /community > > > > > A new community website [4], it can be a place for

[PHP-DEV] Re: [PHP-WEBMASTER] Re: [PHP-DEV] New website for the PHP project

2019-02-05 Thread azjezz
ould like to join you are welcome. https://github.com/azjezz/web-php-mock-ups/invitations -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: [PHP-WEBMASTER] Re: [PHP-DEV] New website for the PHP project

2019-02-05 Thread azjezz
> Is this your desired look you wanna propose? I may misunderstand and this is the original proposal : > https://twitter.com/azjezz/status/1091722433424285698 how ever people seem to lean more toward having releases and changlogs in the front-page. > - example code (with an option

Re: [PHP-DEV] New website for the PHP project

2019-02-04 Thread azjezz
On Tuesday, February 5, 2019 2:20 AM, Andrey Andreev wrote: > Hi, > > On Mon, Feb 4, 2019 at 5:14 PM azjezz azj...@protonmail.com wrote: > > > ‐‐‐ Original Message ‐‐‐ > > On Monday, February 4, 2019 2:32 PM, Andrey Andreev n...@devilix.net wrote: > > &

Re: [PHP-DEV] New website for the PHP project

2019-02-04 Thread azjezz
bicleSoft President > > I've got great, time saving software that you will find useful. > > http://cubiclesoft.com/ > > And once you find my software useful: > > http://cubiclesoft.com/donate/ thanks for your suggestion, i have update the mock up to : 1. include a search input in the navbar 2. move the "Getting Started" button to the navbar 3. include a short description of what PHP is ( the same one that is currently on the of php.net ) see : https://github.com/azjezz/web-php-mock-ups -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] New website for the PHP project

2019-02-04 Thread azjezz
On Monday, February 4, 2019 5:16 PM, Rowan Collins wrote: > On Mon, 4 Feb 2019 at 15:19, azjezz wrote: > >> I'm not proposing updating the UI and other websites to use, instead rebuild >> all PHP websites. > > I'm not sure what the difference between "upd

Re: [PHP-DEV] New website for the PHP project

2019-02-04 Thread azjezz
Sent with ProtonMail Secure Email. ‐‐‐ Original Message ‐‐‐ On Monday, February 4, 2019 2:02 AM, Levi Morrison wrote: > On Sun, Feb 3, 2019 at 5:15 PM azjezz azj...@protonmail.com wrote: > > > Hello Internals ! > > As @official_php suggested [1], I'm here to pro

Re: [PHP-DEV] New website for the PHP project

2019-02-04 Thread azjezz
‐‐‐ Original Message ‐‐‐ On Monday, February 4, 2019 2:32 PM, Andrey Andreev wrote: > Hi, > > I could nitpick on most of the proposed plan, but I really only wanted > to reply to this: > > > > - A new home page, not a "news" page, but a page simply showing the PHP > > > Logo, a code

[PHP-DEV] New website for the PHP project

2019-02-03 Thread azjezz
Hello Internals ! As @official_php suggested [1], I'm here to propose a new website for the PHP Project. In my opinion, current design looks old, outdated and bland. This sadly may reflect "badly" on the language reputation nowadays. New comers find it hard to go around the website, to write