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

String with NULL-byte passback from JS to PHP fails #80

Closed
stesie opened this issue Dec 10, 2013 · 1 comment
Closed

String with NULL-byte passback from JS to PHP fails #80

stesie opened this issue Dec 10, 2013 · 1 comment

Comments

@stesie
Copy link
Member

stesie commented Dec 10, 2013

<?php

$v8js = new V8Js();

$foo = $v8js->executeString("String.fromCharCode(65)");
var_dump($foo);

$foo = $v8js->executeString("String.fromCharCode(0)");
var_dump($foo);

Since both JS and PHP can handle strings with NULL-bytes I would expect even the latter to return a string of one byte length, ... well but:

string(1) "A"
string(0) ""
rosmo pushed a commit to rosmo/v8js that referenced this issue Mar 21, 2014
@rosmo
Copy link

rosmo commented Mar 21, 2014

This should fix this issue: rosmo@3b6390b

@stesie stesie closed this as completed in fd80163 Mar 22, 2014
stesie added a commit that referenced this issue Mar 22, 2014
php_output_write is not available in PHP 5.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants