When debugging in PhpStorm, I am aware that you can right click on a variable in the 'Variables' pane, and select the context menu item 'Copy Value'. Is there a way to copy a data structure, such as an array or object?
$_GET = {array} [1]
someVariable = "Hello this is a value, and it happens to be a string"
anotherVar = "What is this string"
If i right-click on 'someVariable' and select 'Copy Value', I will have the string on my clipboard.
If I right click on the line with the array and select 'Copy Value', I get '[1]' on my clipboard.
What I would really like is when I right click and 'Copy Value' on the array to have something like this on my clipboard:
'[ 'someVariable' = 'Hello this is a value, and it happens to be a string', 'anotherVar' = 'What is this string ]'
Any ideas, or does someone need to make this plugin? ;)
Starting with PhpStorm version 9.0.0 (released July 8, 2015):
With PhpStorm <9.0.0, I was using the following trick (PhpStorm 8.0.2):
$_GET
var_export($_GET,1)
. (The second parameter is set to 1 to return the variable representation instead of outputting it)print_r($_GET,1)
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With