Skip to content

Instantly share code, notes, and snippets.

@kandran
Last active August 29, 2015 14:03
Show Gist options
  • Save kandran/6d4293a49a1c5551e2f0 to your computer and use it in GitHub Desktop.
Save kandran/6d4293a49a1c5551e2f0 to your computer and use it in GitHub Desktop.
PHP Storm Live Template

#PhpStorm Live Template

All my utils live template for phpstorm.

##Dump Value This live template is used for print a value according this type. So array and object are print by var_dump and primitive type with an echo. The END variable allow us to use a die if needed at the end of printing.

if( is_array($VALUE$) || is_object($VALUE$) ){
ob_start();
echo '<pre>';
var_dump($VALUE$);
echo '</pre>';
echo ob_get_clean();
}else{
echo '<pre>';
echo $VALUE$;
echo '</pre>';
}$END$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment