Bug #71301 [Opn->Csd]: substr function behavior changed not documented
[email protected] ("jacky at xsteach dot com")
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
Edit report at https://bugs.php.net/bug.php?id=71301&edit=1
ID: 71301
User updated by: jacky at xsteach dot com
Reported by: jacky at xsteach dot com
Summary: substr function behavior changed not documented
-Status: Open
+Status: Closed
Type: Bug
Package: PHP Language Specification
Operating System: MacOSX 10.11.2
PHP Version: 7.0.1
Block user comment: N
Private report: N
New Comment:
my mistake.sorry!
Previous Comments:
------------------------------------------------------------------------
[2016-01-07 10:35:42] jacky at xsteach dot com
Description:
------------
The behavior of substr function have been changed on php 7, but not mention on the document.
Test script:
---------------
<?php
$s = substr('str',3);
var_dump($s);
// result on php 5.x
// bool(false)
// result on php 7
// string(0) ""
Expected result:
----------------
have the same result
Actual result:
--------------
the return type not compatible.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71301&edit=1