php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49574 PHP syntax error in run-tests.php
Submitted: 2009-09-17 00:28 UTC Modified: 2009-09-17 08:03 UTC
From: deminy at deminy dot net Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.3SVN-2009-09-17 (SVN) OS: OS-unrelated
Private report: No CVE-ID: None
 [2009-09-17 00:28 UTC] deminy at deminy dot net
Description:
------------
By making a 'svn diff' on PHP v3.0 and PHP v3.0.1RC1, I found following changes (which also exists in http://svn.php.net/repository/php/php-src/branches/PHP_5_3/run-tests.php rev 286503 (latest revision):

Index: run-tests.php
===================================================================
--- run-tests.php	(.../php_5_3_0)	(revision 288389)
+++ run-tests.php	(.../php_5_3_1RC1)	(revision 288389)
@@ -1023,7 +1023,7 @@
 {
 	global $leak_check, $cwd;
 
-	$data = '';
+	$data = b'';
 
 	$bin_env = array();
 	foreach((array)$env as $key => $value) {
@@ -1059,23 +1059,23 @@
 			break;
 		} else if ($n === 0) {
 			/* timed out */
-			$data .= "\n ** ERROR: process timed out **\n";
+			$data .= b"\n ** ERROR: process timed out **\n";

Obviously the change introduced some PHP syntax errors.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-17 00:50 UTC] deminy at deminy dot net
I did some tests and found out the syntax is actually right (at least with PHP 5.2.10 on Ubuntu) :) So it is not a bug, however, I couldn't find any documentation/post/article describing this mysterious syntax. It will be very nice if someone can document it in the Strings section of PHP Manual. thanks
 [2009-09-17 08:03 UTC] pajoye@php.net
It is a forward compatibility option to pass binary strings.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Dec 06 12:00:01 2025 UTC