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 ); var_dump(http_parse_cookie($cookie));
based on XNQof
Output for 7.0.0 - 7.1.0
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl" Fatal error: Uncaught Error: Call to undefined function http_parse_cookie() in /in/dgW7P:14 Stack trace: #0 {main} thrown in /in/dgW7P on line 14
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.12.0
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl" Fatal error: Call to undefined function http_parse_cookie() in /in/dgW7P on line 14
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.5 - 4.4.9
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl" Fatal error: Call to undefined function: http_parse_cookie() in /in/dgW7P on line 14
Process exited with code 255.
Output for 4.3.2 - 4.4.4
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl" Fatal error: Call to undefined function: http_parse_cookie() in /in/dgW7P on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(23) " qwertyuioasdfghjkl; " string(18) "qwertyuioasdfghjkl" Fatal error: Call to undefined function: http_parse_cookie() in /in/dgW7P on line 14