3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $card = new stdClass(); $card->accountNumber = '15'; $card->foo = 'bar'; var_dump($card); $request = new stdClass(); $request->card = $card; var_dump($request); $requestForLog = clone($request); $requestForLog->card = "redacted"; var_dump($request);
based on Hpdsp
Output for 5.4.38 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0rc3
object(stdClass)#1 (2) { ["accountNumber"]=> string(2) "15" ["foo"]=> string(3) "bar" } object(stdClass)#2 (1) { ["card"]=> object(stdClass)#1 (2) { ["accountNumber"]=> string(2) "15" ["foo"]=> string(3) "bar" } } object(stdClass)#2 (1) { ["card"]=> object(stdClass)#1 (2) { ["accountNumber"]=> string(2) "15" ["foo"]=> string(3) "bar" } }