Skip to content

Instantly share code, notes, and snippets.

@moacir
Created December 29, 2010 13:31
Show Gist options
  • Save moacir/758535 to your computer and use it in GitHub Desktop.
Save moacir/758535 to your computer and use it in GitHub Desktop.
strstr
{
"name":"strstr",
"purpose":"Find first occurrence of a string",
"manualid":"function.strstr",
"version":"PHP 4, PHP 5",
"params":[
{"name":"haystack","type":"string","optional":"false"},
{"name":"needle","type":"mixed","optional":"false"},
{"name":"before_needle","type":"bool","optional":"true","initializer":"false"}
],
"return":{
"type":"string",
"description":"Returns the portion of string, or FALSE if needle\n is not found."
},
"errors":null,
"notes":[],
"changelog":[
{"version":"5.3.0","change":"Added the optional parameter before_needle."},
{"version":"4.3.0","change":"strstr was made binary safe."}
],
"seealso":[
{"type":"function","name":"preg_match"},
{"type":"function","name":"stristr"},
{"type":"function","name":"strpos"},
{"type":"function","name":"strrchr"},
{"type":"function","name":"substr"}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment