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

Discrepancy between expected and actual output #4312

Open
nyan-dot opened this issue Dec 15, 2024 · 7 comments
Open

Discrepancy between expected and actual output #4312

nyan-dot opened this issue Dec 15, 2024 · 7 comments
Labels

Comments

@nyan-dot
Copy link
Contributor

From manual page: https://php.net/language.types.string


In Example #18, the expected output described in the documentation is:

string(1) "b"
bool(true)

Warning: Illegal string offset '1.0' in /tmp/t.php on line 7
string(1) "b"
bool(false)

Warning: Illegal string offset 'x' in /tmp/t.php on line 9
string(1) "a"
bool(false)
string(1) "b"
bool(false)

However, the actual output is:

string(1) "b"
bool(true)
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in php-wasm run script:7
Stack trace:
#0 {main}
  thrown in php-wasm run script on line 7
@KERNAMON

This comment was marked as off-topic.

@nyan-dot

This comment was marked as off-topic.

@KERNAMON

This comment was marked as off-topic.

@nyan-dot

This comment was marked as off-topic.

@nyan-dot

This comment was marked as off-topic.

@Girgias
Copy link
Member

Girgias commented Dec 21, 2024

@KERNAMON I understand that you are trying to be helpful, but you are not. The expected output is wrong, and has changes as of PHP 8.0, or even PHP 7.4.

Confusing people that open issues by dumping a novel of stuff that you don't even know about is frankly unhelpful to the reporter, and even to maintainers.

Your whole WASM paragraph is just plain wrong. The WASM PHP runtime is the same C runtime that any normal PHP installation has, be that Windows, Linux, WSL, or whatever.

It frankly feels that you are just using some sort of LLM Gen AI junk to try to "help" but you are doing the opposite.

I am pinging @cmb69 to this issue considering you deemed that you didn't warrant the SPAM classification in php/policies#12, but to me, it does. You have provided multiple comments which are not really useful and don't actually make our (well, at least my) job easier.

If you don't know, do not comment. Especially as I had already tagged this as verified.

@kamil-tekiela
Copy link
Member

@KERNAMON I have marked your conversation as off-topic. I also don't think it's SPAM, but it's definitely very unwelcome. Please do not post any more off-topic discussions and incorrect information.

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

No branches or pull requests

4 participants