Skip to content

Instantly share code, notes, and snippets.

@j0inty
Created September 30, 2016 11:21
Show Gist options
  • Save j0inty/3be431a014a2778341482285954dc747 to your computer and use it in GitHub Desktop.
Save j0inty/3be431a014a2778341482285954dc747 to your computer and use it in GitHub Desktop.
PHP: quick method to debug multiple variables in php easiely
<?php
$count = 1;
$cols = 42;
$rows = ["col_0" => "val_0", "col_1" => &$cols, "col_2" => 4711];
print_r(compact(explode(' ', 'count acw cols rows')));
/**
Array
(
[count] => 1
[cols] => 42
[rows] => Array
(
[col_0] => val_0
[col_1] => 42
[col_2] => 4711
)
)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment