3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $header="Set-cookie: test2=12345; expires="; $cookieName=""; $cPos=strpos($header,":"); $headerName=$cPos!==false?strtolower(trim(substr($header,0,$cPos))):""; if ($headerName=="set-cookie") { $ePos=strpos($header,"="); if ($ePos===false) { continue; } $cookieName=trim(substr($header,$cPos+1,$ePos-$cPos-1)); } var_dump($cookieName);
based on ZfsX3
Output for 7.0.0 - 7.0.7
Fatal error: 'continue' not in the 'loop' or 'switch' context in /in/8hniI on line 9
Process exited with code 255.
Output for 5.4.0 - 5.6.28
string(5) "test2"