We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
in C++,
Php::Array PhpArray; Php::Array PhpSubArray({"a","b","c","d"}); PhpArray["1111"]["2222"] = PhpSubArray; Php::call("var_dump", PhpArray); PhpSubArray[0] = "X"; Php::call("var_dump", PhpArray); PhpArray["1111"]["2222"][0] = "X"; Php::call("var_dump", PhpArray);
would result in
array(1) { [1111]=> array(1) { [2222]=> array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" } } } array(1) { [1111]=> array(1) { [2222]=> array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" } } } array(1) { [1111]=> array(1) { [2222]=> array(1) { [0]=> string(1) "X" } } }
while in PHP,
$PhpArray = Array(); $PhpSubArray = Array('A','B','C','D'); $PhpArray['1111']['2222'] = $PhpSubArray; var_dump($PhpArray); $PhpSubArray[0] = 'X'; var_dump($PhpArray); $PhpArray['1111']['2222'][0] = 'X'; var_dump($PhpArray);
result in
array(1) { [1111]=> array(1) { [2222]=> array(4) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" [3]=> string(1) "D" } } } array(1) { [1111]=> array(1) { [2222]=> array(4) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" [3]=> string(1) "D" } } } array(1) { [1111]=> array(1) { [2222]=> array(4) { [0]=> string(1) "X" [1]=> string(1) "B" [2]=> string(1) "C" [3]=> string(1) "D" } } }
Is it normal behavior or is it a bug? Thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
in C++,
would result in
while in PHP,
result in
Is it normal behavior or is it a bug? Thank you!
The text was updated successfully, but these errors were encountered: