bwoebi · GitHub

@bwoebi

Copy link Copy Markdown

Member

This little patch enables unset() to behave as a normal expr. This has for result that unset now returns a random int. While a good alternative for the (mt_)rand() functions, an idea would be to make unset return true if the variable has existed else false?

@ghost

Copy link Copy Markdown

[...] an idea would be to make unset return true if the variable has existed else false?

+1

@laruence

Copy link Copy Markdown

Member

this definitely need a RFC

@lstrojny

Copy link Copy Markdown

Contributor

@lstrojny

Copy link Copy Markdown

Contributor

Otherwise I'll like it but the patch needs tests and making it return a boolean return value is a good idea as well.

@bwoebi

Copy link Copy Markdown

Member Author

I've requested a php-wiki account for creating a rfc. I'll now change the unset language construct and rebase it to PHP-5.5 as you don't consider it as a bug fix only.

@RyanNerd

Copy link Copy Markdown

Why is this closed? This would be very useful.

Closed

Read the original on github.com ↗