]> granicus.if.org Git - php/commitdiff
Fixed test (now string data allocated together with zend_string structure)
authorDmitry Stogov <dmitry@zend.com>
Fri, 11 Apr 2014 19:25:50 +0000 (23:25 +0400)
committerDmitry Stogov <dmitry@zend.com>
Fri, 11 Apr 2014 19:25:50 +0000 (23:25 +0400)
ext/standard/tests/strings/str_pad_variation5.phpt

index cd979a1c8b163f0487ec15d3b83de7bc67fd540f..0dee14865050a3a590fce43f32fb018c76ddf7a9 100644 (file)
@@ -24,7 +24,7 @@ echo "*** Testing str_pad() function: with large value for for 'pad_length' argu
 
 //defining '$input' argument
 $input = "Test string";
-$pad_length = PHP_INT_MAX;
+$pad_length = PHP_INT_MAX - 20 + 1; /* sizeof(zend_string) is 20, 1 character is included in zend_string structure itself */
 var_dump( str_pad($input, $pad_length) );
 
 ?>