Created
December 21, 2019 02:13
-
-
Save andreia/6c3fbc79bf37d3a1ac38ad984befe933 to your computer and use it in GitHub Desktop.
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
<?php | |
// usando funções do PHP | |
if ('.html' === substr($theString, -strlen('.html'))) { | |
// ... | |
} | |
// usando o componente String do Symfony | |
if (u($theString)->endsWith('.html')) { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment