<?php
ini_set("pcre.jit", false);
$re = '/{(?:[^{}]|(?R))*}/';
$str = "{\"message\":\"cURL error 7: Failed to connect to 172.17.0.1
port 3000: Connection refused\",\"trace\":\"#0
/foo/bar/vendor/guzzlehttp/guzzle/src/Adapter/Curl/CurlAdapter.php(112):
GuzzleHttp\Event\RequestEvents::emitError(Object(GuzzleHttp\Adapter\Transaction),
Object(GuzzleHttp\Exception\AdapterException), Array)\n#1
/foo/bar/vendor/guzzlehttp/guzzle/src/Adapter/Curl/CurlAdapter.php(91):
GuzzleHttp\Adapter\Curl\CurlAdapter->handleError(Object(GuzzleHttp\Adapter\Transaction),
Array, Resource id #16)\n#2
/foo/bar/vendor/guzzlehttp/guzzle/src/Client.php(193):
GuzzleHttp\Adapter\Curl\CurlAdapter->send(Object(GuzzleHttp\Adapter\Transaction))\n#3
/foo/bar/vendor/guzzlehttp/guzzle/src/Client.php(181):
GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))\n#4
/foo/bar/components/react/react.php(176):
GuzzleHttp\Client->post('/project/666...', Array)\n#5
/foo/bar/components/react/react.php(136):
react->rendererQuery('project', '{}', Array)\n#6
/foo/bar/controllers/ProjectController.php(50):
react->render('project')\n#7
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(4126):
ProjectController->actionIndex()\n#8
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(3639):
CInlineAction->runWithParams(Array)\n#9
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6815):
CController->runAction(Object(CInlineAction))\n#10
/foo/bar/components/Controller.php(578): CFilterChain->run()\n#11
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6857):
Controller->filterEnsureSSL(Object(CFilterChain))\n#12
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6812):
CInlineFilter->filter(Object(CFilterChain))\n#13
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6824):
CFilterChain->run()\n#14
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(4017):
CFilter->filter(Object(CFilterChain))\n#15
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6857):
CController->filterAccessControl(Object(CFilterChain))\n#16
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6812):
CInlineFilter->filter(Object(CFilterChain))\n#17
/foo/bar/components/Controller.php(258): CFilterChain->run()\n#18
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6857):
Controller->filterEnsureCanonicalHost(Object(CFilterChain))\n#19
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(6812):
CInlineFilter->filter(Object(CFilterChain))\n#20
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(3629):
CFilterChain->run()\n#21 /foo/bar/components/Controller.php(357):
CController->runActionWithFilters(Object(CInlineAction), Array)\n#22
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(3614):
Controller->runActionWithFilters(Object(CInlineAction), Array)\n#23
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(1761):
CController->run('index')\n#24
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(1681):
CWebApplication->runController('project/index')\n#25
/foo/bar/lib/pph-yii-repo/framework/yiilite.php(1202):
CWebApplication->processRequest()\n#26 /foo/bar/www/index.php(18):
CApplication->run()\n#27 {main}\",\"json_encoded\":true}";
preg_match($re, $str, $matches);
var_dump(array_keys(get_defined_constants(true)["pcre"], preg_last_error()));
// Print the entire match result
print_r($matches);
preferences:
50.64 ms | 402 KiB | 5 Q