|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-09-13 01:19 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2015-09-13 01:19 UTC] requinix@php.net
[2015-09-13 01:24 UTC] nino dot skopac at gmail dot com
[2015-09-13 01:29 UTC] requinix@php.net
-Status: Feedback
+Status: Not a bug
[2015-09-13 01:29 UTC] requinix@php.net
[2015-09-13 01:32 UTC] nino dot skopac at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
Description: ------------ When using substr() on v.7 RC2 on my local machine, I am getting different results than when I run the same script on my Linux webserver running v. 5.6.11 Test script: --------------- <?php error_reporting(E_ALL); ob_start(); ?> resources/layout.css resources/jquery.fancybox.css <?php $files = ob_get_clean(); $fs = explode("\n", $files); foreach($fs as $f) { $ext = substr($f, strrpos($f, "."), strlen($f)); $ext_trimmed = trim($ext); var_dump($ext, $ext_trimmed); } ?> Expected result: ---------------- string(4) ".css" string(4) ".css" string(4) ".css" string(4) ".css" bool(false) string(0) "" Actual result: -------------- string(5) ".css" string(4) ".css" string(5) ".css" string(4) ".css" string(0) "" string(0) ""