Edit report at https://bugs.php.net/bug.php?id=71301&edit=1
ID: 71301
Updated by: requinix@php.net
Reported by: jacky at xsteach dot com
Summary: substr function behavior changed not documented
-Status: Closed
+Status: Not a bug
Type: Bug
-Package: PHP Language Specification
+Package: Strings related
Operating System: MacOSX 10.11.2
PHP Version: 7.0.1
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-01-07 10:40:42] jacky at xsteach dot com
my mistake.sorry!
------------------------------------------------------------------------
[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