Skip to content

Instantly share code, notes, and snippets.

@whyisjake
Created September 22, 2014 20:57
Show Gist options
  • Save whyisjake/befe9ad5b2fb1bc1330f to your computer and use it in GitHub Desktop.
Save whyisjake/befe9ad5b2fb1bc1330f to your computer and use it in GitHub Desktop.
Little Sublime Text snippet to take a PHP object, and output as JSON, and then console.log() it.
<snippet>
<content><![CDATA[<script>console.log(<?php echo json_encode( ${1:\$this} ); ?>);</script>]]></content>
<tabTrigger>phpconsole</tabTrigger>
<scope>source.php</scope>
<description>PHP Console</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment