Home Download Buy Blog Forum Support

Validate PHP Syntax

Re: Validate PHP Syntax

Postby jbrooksuk on Tue Apr 12, 2011 2:53 pm

allaire wrote:Also, is there any way to make the console that pops a fixed height each time I open a window or I start Sublime? I have to resize it everytime :)

Unless Jon has added an option for it, I don't think there is.
jbrooksuk
 
Posts: 754
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Validate PHP Syntax

Postby macphreak on Mon Jan 16, 2012 9:13 am

Would you happen to know how I would do this for a Mac environment? I am trying to setup Sublime to validate PHP using my Mac and am running into problems. I am using MAMP (also, I know Mac's come with PHP built in so I could use that as well).

Thanks!
macphreak
 
Posts: 1
Joined: Mon Jan 16, 2012 9:11 am

Re: Validate PHP Syntax

Postby kyprios1 on Fri Feb 03, 2012 1:54 pm

macphreak wrote:Would you happen to know how I would do this for a Mac environment? I am trying to setup Sublime to validate PHP using my Mac and am running into problems. I am using MAMP (also, I know Mac's come with PHP built in so I could use that as well).

Thanks!

Sure!
http://joeybaker.tumblr.com/post/7304011987/how-to-add-php-validation-to-sublime-text-2 wrote:
Tools > Build System > New Build System…
Paste in:
Code: Select all
{
     "cmd": ["/usr/bin/php", "-l", "$file"]
   , "selector": "source.php"
   , "file_regex": "^Parse error: .* in (.*?) on line ([0-9]*)"
}

Now, just hit ⌘-b to validate any PHP file.
kyprios1
 
Posts: 8
Joined: Sat Nov 05, 2011 11:37 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 16 guests