Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make debug_zval_dump and var_dump prints int and float the same #1434

Merged
merged 1 commit into from
Jul 30, 2015

Conversation

laruence
Copy link
Member

debug_zval_dump prints int as long, float as double

however var_dump prints int as int, float as float

this PR make them output the same (var_dump's behavior)

@laruence
Copy link
Member Author

@weltling RM, what do you think of this? could this be merged to master(7.0)?

thanks

@weltling
Copy link
Contributor

One real usage i could find on github is https://github.com/symfony/symfony/blob/2aeaa22e3171b5e1f10f2cc2a7ff7f6608b65f9d/src/Symfony/Component/VarDumper/Cloner/VarCloner.php#L293 ... this change doesn't break it. Otherwise don't see any PHP project making real use of debug_zval_dump(). However you know, it's only github.

What is more concerning, IMHO, things like https://github.com/hippyvm/hippyvm/blob/c8a1d94b59d71af89133e099bfcbb43cea54a6a4/test_phpt/ext/standard/array/extract_variation1.phpt or HHVM which might have not enough time to catch up when we do it just momentary, keyword "language specification".

@laruence did you do some research about the projects impact, too?

Thanks.

@laruence
Copy link
Member Author

@weltling as I can see, it's not common used, only debuging purpose.. anyway, this is just for consistency, and doesn't improve anything. so..... accepting or not accepting are both fine ;)

@weltling
Copy link
Contributor

@laruence yeah, debug is obviously not an issue, i thought more to check whether it'd break some unit test or code. But don't see it currently.

I would suggest wait a couple of days for some more feedback, and then take it in? Then we'll see during next week whether something is possibly wrong and can revert it? I'm sure i can rely on your experience in this regard. Consistency is good, on the other hand - it's not a critical issue.

Thanks.

@laruence
Copy link
Member Author

@weltling okey, no problem, thanks :)

@php-pulls php-pulls merged commit c55c7ef into php:master Jul 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants