3v4l.org

run code in 300+ PHP versions simultaneously
<?php function Match($str, $re) { $matches = array(); preg_match($re, $str, $matches); return count($matches) > 0 ? $matches[0] : NULL; } $args = array("id" => 77949); $data = file_get_contents("http://ru.wowhead.com/item=".$args["id"]."&power"); $item = array( "name" => "", "quality" => 0, "icon" => 0, "tooltip" => "" ); $item["name"] = Match($data, "/name_ruru: '(.+)'/"); $item["quality"] = Match($data, "/quality: '(.+)'/"); $item["icon"] = Match($data, "/icon: '(.+)'/"); $item["tooltip"] = Match($data, "/tooltip_ruru: '(.+)'/"); print(json_encode($item, JSON_UNESCAPED_UNICODE)); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Parse error: syntax error, unexpected token "match", expecting "(" in /in/SJ0UR on line 4
Process exited with code 255.

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:
43.06 ms | 401 KiB | 8 Q