Bug #68550 [Opn->Nab]: calling a field using an object type.

From: Date: Fri, 05 Dec 2014 11:12:06 +0000
Subject: Bug #68550 [Opn->Nab]: calling a field using an object type.
References: 1  Groups: php.standards 
Request: Send a blank email to standards-+get-577@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68550&edit=1 ID: 68550 Updated by: ajf@php.net Reported by: rahulagr12345 at yahoo dot com Summary: calling a field using an object type. -Status: Open +Status: Not a bug Type: Bug Package: PHP Language Specification Operating System: Any PHP Version: 5.4.35 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This isn't a bug. PHP identifiers can't have dots in them, since that's the concatenation operator. You probably want to do $database->{"pa.ab"} Previous Comments: ------------------------------------------------------------------------ [2014-12-05 09:47:53] rahulagr12345 at yahoo dot com Description: ------------ Hi Sir, I want to know that if i am calling a field using object having a dot[.] in it. leads to problem for me. Test script: --------------- field name in database is "pa.ab". If we fetch data from database using mysql_fetch_object like "$database->pa.ab" It will read it as "$database->pa". First of all i want to know is this an bug, error or my mistake on it. and if it an issue to be handle differently then how to handle such cases. Expected result: ---------------- $database->pa.ab will be read and return the same value as in database Actual result: -------------- $database->pa will read by programm and nothing is returned. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68550&edit=1

« previous php.standards (#577) next »