Using the following code in a function:
ob_start();
phpinfo();
$phpinfoAsString = ob_get_contents();
ob_get_clean();
$phpInfo = new PHPInfo();
$phpInfo->setText($phpinfoAsString);
return response()->json($phpInfo->get());
Results in an "Undefined offset: 1 in PHPInfo.php line 54" which is being triggered by the last line where $phpInfo->get() is being called as part of the response.
The code is running from a Lumen controller (Laravel API).
Versions:
"Lumen": "Lumen (5.6.4) (Laravel Components 5.6.*)",
"PHP": "7.1.19"
Using the following code in a function:
Results in an "Undefined offset: 1 in PHPInfo.php line 54" which is being triggered by the last line where
$phpInfo->get()is being called as part of the response.The code is running from a Lumen controller (Laravel API).
Versions:
"Lumen": "Lumen (5.6.4) (Laravel Components 5.6.*)",
"PHP": "7.1.19"