
This image sums it up. Whenever I write a PHP tag "inside" a PHP tag that ends in open brackets [if, else, for, ...], the rest of the line becomes white.
EDIT: @MattDMo opened an issue in Sublime github repo and seems like they already commited a fix for it. Now we just have to wait for a deploy :)
This problem is an issue with the PHP.sublime-syntax file in recent Sublime Text 3 builds. As explained in this pull request, there are some things going on behind the scenes when PHP and HTML code mix, especially when HTML is inside of a curly brace block. The PR was accepted, and the current version of the PHP package should now work as expected. To upgrade your installation of ST3, Build 3080 or later (and you really should be using the current Build 3114 of the public beta, or Build 3113 on the dev track), change to a temp directory or someplace and run
git clone https://github.com/sublimehq/Packages.git
or download the zipfile of the repo and expand it. Enter the created Packages directory, then copy the entire PHP folder to Sublime's Packages directory:
~/Library/Application Support/Sublime Text 3/Packages~/.config/sublime-text-3/PackagesC:\Users\UserName\AppData\Roaming\Sublime Text 3\PackagesInstallationDirectory\Data\PackagesPlease keep in mind that this will override (but not overwrite) Sublime's default PHP package, and will not be upgraded when you install a new build, with will almost certainly have additional changes as well. Simply remember to delete the new Packages/PHP directory upon upgrade, and you'll be all set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With