3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = <<<CODE require_once 'config.php'; require_once 'startup.php'; //TODO: Добавить очистку массивов POST и GET \$input = new Input; \$session = new Session; \$cookie = new Cookie; # hashcomment \$user = User::getInstance(); //test - admin is permanently logged in \$session->set('hash', '06260034fa0ac9fef81991f93abf2db3'); //test \$hash = \$session->get('hash') ? \$session->get('hash') : \$cookie->get('hash'); \$user->fetchOneByHash(\$hash); //Запускаем action, в зависимости от того, что пришло в POST /** * Записываем в текущую историю то, что пришло из POST['text'] * (пользователь мог изменить предыдущий результат в поле ввода текста вручную) * Если же история пуста, произойдет инициализация сессии с историей - * в сессию в \$_SESSION[category][0][text] запишется POST['text'] */ \$history = History::getInstance(History::CURRENT_RECORD); \$history->set('text', \$input->post('text')); \$history->destroyInstance(); \$action = new Action(\$route); \$action->execute(); CODE; preg_match_all('~(?(DEFINE) (?<comment> (?&line_comment) | (?&block_comment)) (?<line_comment> (?&slash_comment) | (?&hash_comment)) (?<slash_comment> //.*) (?<hash_comment> \#.*) (?<block_comment> (?s)/\*.*?\*/) ) (?&comment)~x', $code, $matches); print_r($matches);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => //TODO: Добавить очистку массивов POST и GET [1] => # hashcomment [2] => //test - admin is permanently logged in [3] => //test [4] => //Запускаем action, в зависимости от того, что пришло в POST [5] => /** * Записываем в текущую историю то, что пришло из POST['text'] * (пользователь мог изменить предыдущий результат в поле ввода текста вручную) * Если же история пуста, произойдет инициализация сессии с историей - * в сессию в $_SESSION[category][0][text] запишется POST['text'] */ ) [comment] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [1] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [line_comment] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [2] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [slash_comment] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [3] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [hash_comment] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [4] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [block_comment] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) [5] => Array ( [0] => [1] => [2] => [3] => [4] => [5] => ) )

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:
36.07 ms | 409 KiB | 8 Q