Skip to content
PHP Ecosystem
Explore

PhpExportDetector

API reference › Debug Core › Panel › Log › PhpExportDetector

final classPHPForge\Debug\Panel\Log\PhpExportDetector
Sourcesrc/Panel/Log/PhpExportDetector.php

Detects a log message that is the var_export() or VarDumper::export() output of an array or object and returns it in short array syntax.

Never evaluates the message and never changes string contents; only the array syntax and indentation are rewritten.

MethodDescriptionDefined by
detect() staticReturns a PHP value export in short array syntax.PhpExportDetector
public static function detect(string $message): string|null

Returns a PHP value export in short array syntax.

Parameters

ParameterTypeDescription
$messagestring

Returns

string|null: Export source, or null when the message is not one export expression within the bounds.