3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = "test;colorgroup-b;test;abc"; var_dump(string_includes("group", $params)); //outputs: colorgroup-b function string_includes($needle, $haystack) { $needlePosition = strpos($haystack, $needle); if ($needlePosition === false) { return false; } $needleEndPosition = strpos($haystack, ';', $needlePosition); if ($needleEndPosition !== false) { $haystack = substr($haystack, 0, $needleEndPosition); } $delimiterPosition = strrpos($haystack, ';'); if ($delimiterPosition === false) { return $haystack; } return substr($haystack, $delimiterPosition + 1); }
Output for git.master, git.master_jit, rfc.property-hooks
string(12) "colorgroup-b"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
131.99 ms | 405 KiB | 5 Q