3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "CN=van der Valk\, Marco,OU=UT,OU=NL,OU=EMEA,OU=associates,OU=usersAndGroups,DC=corporate,DC=ingrammicro,DC=com"; $CN = strpos($str, "CN=")+3; Echo substr($str, $CN, strpos($str, '\\', $CN)-3);

preferences:
59.39 ms | 405 KiB | 5 Q