| Conditions | 5 |
| Paths | 3 |
| Total Lines | 25 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function actionIndex() |
||
| 17 | { |
||
| 18 | if (!YII_DEBUG) { |
||
| 19 | throw new UnauthorizedHttpException(); |
||
| 20 | } |
||
| 21 | |||
| 22 | ob_start(); |
||
| 23 | echo 'User IP: ' . Yii::$app->request->userIP; |
||
| 24 | echo '<br>'; |
||
| 25 | echo 'Xdebug extension loaded: ' . (extension_loaded('xdebug') ? 'yes' : 'no'); |
||
| 26 | echo '<br>'; |
||
| 27 | echo 'Xdebug debugger active: ' . ((@xdebug_is_debugger_active() ?? false) ? 'yes' : 'no'); |
||
| 28 | echo '<br>'; |
||
| 29 | echo 'realpath_cache_size: ' . Yii::$app->formatter->asShortSize(realpath_cache_size()); |
||
| 30 | echo '<br>'; |
||
| 31 | phpinfo(); |
||
| 32 | $output = ob_get_clean(); |
||
| 33 | |||
| 34 | if (extension_loaded('xdebug')) { |
||
| 35 | ob_start(); |
||
| 36 | xdebug_info(); |
||
| 37 | $output .= ob_get_clean(); |
||
| 38 | } |
||
| 39 | |||
| 40 | return $output; |
||
| 41 | } |
||
| 43 |