Bug #63784 [Opn]: var_export() produces EOL symbols irregardless of target OS

From: Date: Sun, 23 Dec 2012 18:36:00 +0000
Subject: Bug #63784 [Opn]: var_export() produces EOL symbols irregardless of target OS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175569@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63784&edit=1

 ID:                 63784
 Updated by:         felipe@php.net
 Reported by:        hayk at mail dot ru
 Summary:            var_export() produces EOL symbols irregardless of
                     target OS
 Status:             Open
 Type:               Bug
 Package:            *General Issues
 Operating System:   Windows XP
 PHP Version:        5.4.9
 Block user comment: N
 Private report:     N

 New Comment:

Actually it is not only var_export(), var_dump() also uses hardcoded LF.


Previous Comments:
------------------------------------------------------------------------
[2012-12-16 23:25:05] hayk at mail dot ru

Description:
------------
var_export() produces EOL symbols irregardless of target OS. It's always "\n" even on
Windows.

Test script:
---------------
<?php
	$a = array('a' => 1);
	echo var_export($a, true);
	echo strlen(var_export($a, true));
?>

Expected result:
----------------
array (
  'a' => 1,
)23

Actual result:
--------------
array (
  'a' => 1,
)21


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63784&edit=1


Thread (4 messages)

« previous php.bugs (#175569) next »