3v4l.org

run code in 300+ 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:
36.67 ms | 402 KiB | 5 Q