Created
July 12, 2012 15:35
-
-
Save kdambekalns/3098900 to your computer and use it in GitHub Desktop.
Comparison of substr and substr_compare
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 | |
$className = 'FLOW3_Foo_Bar_Original'; | |
for ($i = 0 ; $i < 1000000; $i++) { | |
substr($className, -9) === '_Original'; | |
} |
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 | |
$className = 'FLOW3_Foo_Bar_Original'; | |
for ($i = 0 ; $i < 1000000; $i++) { | |
substr_compare($className, '_Original', 1, 9); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment