Skip to content

Instantly share code, notes, and snippets.

@rATRIJS
Created April 24, 2012 08:35
Show Gist options
  • Save rATRIJS/2477927 to your computer and use it in GitHub Desktop.
Save rATRIJS/2477927 to your computer and use it in GitHub Desktop.
Some random regex vs strpos test results
/$: include '/home/rolands/Public/Web/regexvsstrpos.php'
# Return
int(1)
/$: test_test_valid_strpos('some string goes here that is valid')
# Return
float(10.26731300354)
/$: test_test_valid_regex('some string goes here that is valid')
# Return
float(4.4104700088501)
/$: test_test_valid_strpbrk('some string goes here that is valid')
# Return
float(2.7595899105072)
/$: test_test_valid_strpos(';some string goes here that is not valid')
# Return
float(4.0172011852264)
/$: test_test_valid_regex(';some string goes here that is not valid')
# Return
float(3.1515209674835)
/$: test_test_valid_strpbrk(';some string goes here that is not valid')
# Return
float(2.8948299884796)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment