public static function toHumanReadablePhpString($value, $indentation = 0)
    {
        if (gettype($value) == "array") {
            $array = array_keys($value);
            $assocArray = ($array !== array_keys($array));
            $string = "";
            if ($assocArray) {
                foreach ($value as $key => $val) {
                	$string .= PHP_EOL.str_repeat('    ', $indentation+1)
                       .self::toPHPVariableString($key)
                	   ." => "
                       .self::toHumanReadablePhpString($val, $indentation+1).",";
                }
            } else {
                foreach ($value as $val) {
                    $string .= PHP_EOL.str_repeat('    ', $indentation+1)
                        .self::toHumanReadablePhpString($val, $indentation+1).",";
                }
            }
            $returnValue = "array(".substr($string, 0, -1).PHP_EOL.str_repeat('    ', $indentation).")";
        } else {
            $lines = explode(PHP_EOL, self::toPHPVariableString($value));
            $returnValue = implode(PHP_EOL.str_repeat('    ', $indentation), $lines);
        }
        
        return (string) $returnValue;
    }
public static function toHumanReadablePhpString($value, $indentation = 0)
    {
        if (gettype($value) == "array") {
            $array = array_keys($value);
            $assocArray = ($array !== array_keys($array));
            $string = "";
            if ($assocArray) {
                foreach ($value as $key => $val) {
                	$string .= PHP_EOL.str_repeat('    ', $indentation+1)
                       .self::toPHPVariableString($key)
                	   ." => "
                       .self::toHumanReadablePhpString($val, $indentation+1).",";
                }
            } else {
                foreach ($value as $val) {
                    $string .= PHP_EOL.str_repeat('    ', $indentation+1)
                        .self::toHumanReadablePhpString($val, $indentation+1).",";
                }
            }
            $returnValue = "array(".substr($string, 0, -1).PHP_EOL.str_repeat('    ', $indentation).")";
        } else {
            $lines = explode(PHP_EOL, self::toPHPVariableString($value));
            $returnValue = implode(PHP_EOL.str_repeat('    ', $indentation), $lines);
        }
        
        return (string) $returnValue;
    }
public static function toHumanReadablePhpString ( $ value , $ indentation = 0 ) { if ( gettype ( $ value ) == "array" ) { $ array = array_keys ( $ value ) ; $ assocArray = ( $ array !== array_keys ( $ array ) ) ; $ string = "" ; if ( $ assocArray ) { foreach ( $ value as $ key => $ val ) { $ string .= PHP_EOL . str_repeat ( '    ' , $ indentation + 1 ) . self :: toPHPVariableString ( $ key ) . " => " . self :: toHumanReadablePhpString ( $ val , $ indentation + 1 ) . "," ; } } else { foreach ( $ value as $ val ) { $ string .= PHP_EOL . str_repeat ( '    ' , $ indentation + 1 ) . self :: toHumanReadablePhpString ( $ val , $ indentation + 1 ) . "," ; } } $ returnValue = "array(" . substr ( $ string , 0 , - 1 ) . PHP_EOL . str_repeat ( '    ' , $ indentation ) . ")" ; } else { $ lines = explode ( PHP_EOL , self :: toPHPVariableString ( $ value ) ) ; $ returnValue = implode ( PHP_EOL . str_repeat ( '    ' , $ indentation ) , $ lines ) ; } return ( string ) $ returnValue ; }
Same as toPHPVariableString except the sting
is easier for humans to read

@param mixed $value
@param number indentation
@return string
Same as toPHPVariableString except the sting is easier for humans to read