Created
August 15, 2017 04:18
-
-
Save rxu/778e85a2b50d3633f8fbe9f1f0b5ed25 to your computer and use it in GitHub Desktop.
Blind ternary
This file contains 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
preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END .*? -->#s', $template, $matches, PREG_SET_ORDER) ?: | |
preg_match_all('#{% for (.*?) in .*? %}(.*?){% endfor %}#s', $template, $matches, PREG_SET_ORDER); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment