note 119681 rejected from faq by cmb
| From: | cmb@php.net | Date: | Tue, 02 Aug 2016 08:59:20 +0000 |
| Subject: | note 119681 rejected from faq by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206150@lists.php.net to get a copy of this message | ||
Note Submitter: dilovanmatini at yahoo dot com
----
Why not add this style of coding:
// old style
echo substr( strtolower( trim( $string ) ), 0, 4 );
// new style
echo $string->trim()->strtolower()->substr( 0, 4 );
or
// old style
$array = array_merge( $array, $array2 );
$array = array_values( $array );
echo $array[12];
// new style
echo $array->merge( $array2 )->values->get(7);
it is too simple for using