Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

老大 第三个 var_dump 为什么要将换行符 换成 PHP_EOL? #1

Open
zhumingzhen opened this issue Aug 20, 2019 · 1 comment
Open

Comments

@zhumingzhen
Copy link

No description provided.

@nonfu
Copy link
Owner

nonfu commented Aug 20, 2019

因为这样做代码可移植性更好,不需要根据不同操作系统进行调整:

<?php
echo PHP_EOL;
//windows平台相当于    echo "\r\n";
//unix\linux平台相当于    echo "\n";
//mac平台相当于    echo "\r";
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants