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

++ on string starting with integer is non-compliant with PHP behavior #4889

Closed
ralt opened this issue Feb 23, 2015 · 1 comment
Closed

++ on string starting with integer is non-compliant with PHP behavior #4889

ralt opened this issue Feb 23, 2015 · 1 comment
Assignees

Comments

@ralt
Copy link

ralt commented Feb 23, 2015

<?php

$foo = "100 apples";
echo ++$foo; // 101 on HHVM, "100 applet" on PHP

Proof: http://3v4l.org/8ZoSO

When doing $foo = "apples"; echo ++$foo, HHVM correctly returns "applet". So it's a matter of precedence.

@sgolemon
Copy link
Contributor

sgolemon commented Mar 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants