[wp-trac] [WordPress Trac] #13900: Curly Braces String Index-Based-Access Deprecated

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 15 10:34:20 UTC 2010


#13900: Curly Braces String Index-Based-Access Deprecated
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0.1    
Component:  General       |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 [http://php.net/manual/en/language.types.string.php#llanguage.types.string.substr
 From the PHP Manual]:
 > Note: String s [!sic] may also be accessed using braces, as in
 $str!{42}, for the same purpose. However, this syntax is deprecated as of
 PHP 5.3.0. Use square brackets instead, such as $str![42].

 It is recommended to replace it using square brackets ({{{[}}},{{{]}}})

 (Informative: I know at least that it has been warned about to use that
 since a longer time. It is a very old syntax and you find it often in
 outdated code, even before PHP 5.3.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13900>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list