3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text="('x-csrf-token', 'whatever')"; preg_match("/x-csrf-token',\s*'([^']+)/mi",$text,$matches); $token=$matches[1]; var_dump($token);

preferences:
83.32 ms | 1234 KiB | 5 Q