Last active
          August 29, 2015 14:02 
        
      - 
      
- 
        Save infn8/24b4c90ddff1abfb050b to your computer and use it in GitHub Desktop. 
    Var Dump Helper Function and sublime caller snippet
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function var_pre($var, $msg = NULL){ | |
| /* | |
| Helper Function: | |
| Use *instead of* var_dump(); | |
| will output var_dump wrapped with <pre></pre> and give an optional 2nd param for a message. | |
| */ | |
| echo "\n<pre>"; | |
| if($msg !== NULL){ | |
| echo "\n".$msg."\n"; | |
| } | |
| var_dump($var); | |
| echo "</pre>\n"; | |
| } | |
| ?> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <snippet> | |
| <content><![CDATA[ | |
| var_pre(\$${1:var}${2:, "${1:msg}"}); | |
| ]]></content> | |
| <tabTrigger>varpre</tabTrigger> | |
| </snippet> | 
Looks like I did. Fixed now. Thanks beautiful.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
hey dork. you forgot a curly brace!