1--TEST-- 2A SensitiveParameterValue keeps the inner value secret. 3--FILE-- 4<?php 5 6$v = new SensitiveParameterValue('secret'); 7 8echo "# var_dump() / debug_zval_dump() / print_r()", PHP_EOL; 9var_dump($v); 10debug_zval_dump($v); 11print_r($v); 12echo PHP_EOL; 13 14echo "# var_export()", PHP_EOL; 15echo var_export($v, true), PHP_EOL; 16echo PHP_EOL; 17 18echo "# (array) / json_encode()", PHP_EOL; 19var_dump((array)$v); 20var_dump(json_encode($v)); 21echo PHP_EOL; 22 23echo "# ->getValue()", PHP_EOL; 24var_dump($v->getValue()); 25 26?> 27--EXPECTF-- 28# var_dump() / debug_zval_dump() / print_r() 29object(SensitiveParameterValue)#%d (0) { 30} 31object(SensitiveParameterValue)#%d (%d) refcount(%d){ 32} 33SensitiveParameterValue Object 34( 35) 36 37# var_export() 38\SensitiveParameterValue::__set_state(array( 39)) 40 41# (array) / json_encode() 42array(0) { 43} 44string(2) "{}" 45 46# ->getValue() 47string(6) "secret" 48