public static function prettyPrint($data, $prefix = '')
    {
        $php = '[' . PHP_EOL;
        if (is_array($data) and array_diff_key($data, array_keys(array_keys($data)))) {
            foreach ($data as $key => $value) {
                $php .= $prefix . '  ' . var_export($key, true) . ' => ';
                if (is_array($value)) {
                    $php .= self::prettyPrint($value, $prefix . '  ');
                } else {
                    $php .= var_export($value, true);
                }
                $php .= ',' . PHP_EOL;
            }
        } else {
            foreach ($data as $value) {
                $php .= $prefix . '  ';
                if (is_array($value)) {
                    $php .= self::prettyPrint($value, $prefix . '  ');
                } else {
                    $php .= var_export($value, true);
                }
                $php .= ',' . PHP_EOL;
            }
        }
        return $php . $prefix . ']';
    }
public static function prettyPrint($data, $prefix = '')
    {
        $php = '[' . PHP_EOL;
        if (is_array($data) and array_diff_key($data, array_keys(array_keys($data)))) {
            foreach ($data as $key => $value) {
                $php .= $prefix . '  ' . var_export($key, true) . ' => ';
                if (is_array($value)) {
                    $php .= self::prettyPrint($value, $prefix . '  ');
                } else {
                    $php .= var_export($value, true);
                }
                $php .= ',' . PHP_EOL;
            }
        } else {
            foreach ($data as $value) {
                $php .= $prefix . '  ';
                if (is_array($value)) {
                    $php .= self::prettyPrint($value, $prefix . '  ');
                } else {
                    $php .= var_export($value, true);
                }
                $php .= ',' . PHP_EOL;
            }
        }
        return $php . $prefix . ']';
    }
public static function prettyPrint ( $ data , $ prefix = '' ) { $ php = '[' . PHP_EOL ; if ( is_array ( $ data ) and array_diff_key ( $ data , array_keys ( array_keys ( $ data ) ) ) ) { foreach ( $ data as $ key => $ value ) { $ php .= $ prefix . '  ' . var_export ( $ key , true ) . ' => ' ; if ( is_array ( $ value ) ) { $ php .= self :: prettyPrint ( $ value , $ prefix . '  ' ) ; } else { $ php .= var_export ( $ value , true ) ; } $ php .= ',' . PHP_EOL ; } } else { foreach ( $ data as $ value ) { $ php .= $ prefix . '  ' ; if ( is_array ( $ value ) ) { $ php .= self :: prettyPrint ( $ value , $ prefix . '  ' ) ; } else { $ php .= var_export ( $ value , true ) ; } $ php .= ',' . PHP_EOL ; } } return $ php . $ prefix . ']' ; }
Create valid PHP array representation

@param array $data
Associative array
@param string $prefix
Prefix to put in front of new lines
@return string PHP source
Create valid PHP array representation