3v4l.org

run code in 300+ PHP versions simultaneously
<?php $req = 'Authorization: Digest nonce="53a193b54e06b",nc="0",cnonce="b059cf311750c47cf6baaf95b86260a6",qop="auth",username="Localstars",uri="http://sandbox.print.localstars.com/templates/d.1402656459.52/create.json",response="a7b7e42197b430c4359a4d6ed815c1b0"'; function http_digest_parse($txt) { // protect against missing data $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); $data = array(); $keys = implode('|', array_keys($needed_parts)); preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $txt, $matches, PREG_SET_ORDER); foreach ($matches as $m) { $data[$m[1]] = $m[3] ? $m[3] : $m[4]; unset($needed_parts[$m[1]]); } return $needed_parts ? false : $data; } http_digest_parse($req);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 4 in /in/NTfGY on line 15

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.18 ms | 401 KiB | 8 Q