3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cookie=" CBSESSID=qwertyuioasdfghjkl; path=/ "; $cookie = preg_replace( '/CBSESSID=/', '', $cookie ); $cookie = preg_replace( '/ path=\//', '', $cookie ); var_dump( $cookie ); $cookie = preg_replace( '/;/', '', trim($cookie) ); var_dump( $cookie );
based on 8n2VL
Output for 4.3.0 - 7.1.0
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl"