Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialWalter Cortez
4,071 PointsI'd like to ask a curious question...
How would I show a block of php code in a code editor such as Sublime 3 and show results as in console?(this would be for portfolio purposes as an example).
-Thank you
2 Answers
Micah Doulos
17,663 PointsSublime may have the ability to host a live server. Ie, show changes made in your code editor automatically inside of your browser. I use Atom code editor for this very purpose. I have Atom-live-server installed, which is an easy to find and install package inside of Atom. Save your .php file, and automatically any changes are reflected in the browser and therefore the browsers dev-tools console.
Erick Lopes
670 PointsBest way to achieve what u want is to makesure php is installed on your developing machine, then pop up a new terminal window, navigate to your .php file and invoke: php <filename>.php
Altough there is a console feature in sublime-text I didn't get how it works... seems to be something to control things inside of sublime instead of running stuff, I may be wrong tho.