On Fri, Oct 28, 2011 at 9:43 AM, QI.VOLMAR QI wrote:
> Is there a function or method that calculate the object size in PHP?.
> Or maybe that calculates a xml buffer of a file? I need to check a
> size of a file, and if it's size is bigger than 500kb. I will need to
> make another file to the subs
Is there a function or method that calculate the object size in PHP?.
Or maybe that calculates a xml buffer of a file? I need to check a
size of a file, and if it's size is bigger than 500kb. I will need to
make another file to the subsequent content. Any help will serve.
Tks,
Volmar
--
PHP Gene
hi,
"I often use SQL that is far, far more complex than this."
well, this is why my OQL is pretty simple, it does not intend to do any
crazy stuff that you can do with SQL (as I can load objects from SQL as
well)
I had a look at other ORM, and the problem is that some are extremely
complicated (D
Hi.
On Saturday 21 May 2011 at 15:56 jean-baptiste verrey wrote:
> I'm writing an Object Query Language
[snip]
> (queries don't get much more complicated than that, you have multiple
> alias.fieldName in the select, then multiple joins)
I often use SQL that is far, far more complex than this.
hi folks,
I'm writing an Object Query Language which is pretty simple, you do request
such as
*SELECT e.*,c.firstName *
*FROM employee e *
*JOIN contact c ON e*
*WHERE e.id=*?
(queries don't get much more complicated than that, you have multiple
alias.fieldName in the select, then multiple joins)
At 1:59 PM +0200 5/1/10, Michelle Konzack wrote:
Hello *,
before I reinvent the wheel, I ask here, if someone know an "object" or
"function" which build from an array of directories (filesystem or IMAP)
a directory tree which can be opened and close?
I have the need to do this for a "local and
Hello *,
before I reinvent the wheel, I ask here, if someone know an "object" or
"function" which build from an array of directories (filesystem or IMAP)
a directory tree which can be opened and close?
I have the need to do this for a "local and remote filesystem" and a
"courier-imap tree".
I also agree OOP is not a fad. Its a step up from procedural/including.
And it's still evolving.
While PHP is able to do polymorphism perfectly without OOP/classes,
through "require($plugin/className); $varFunctionName ($p1, $p2,
etc);", My newsscraper works very well that way.
But if you want inh
On Fri, 2010-03-12 at 06:49 -0800, Andrew Brookins wrote:
> On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones wrote:
> > Hi,
> >
> > I've been learning about object oriented programming for the past few weeks
> > and I've understood it pretty well, but I have one question. Usually with
> > PHP scripts
On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones wrote:
> Hi,
>
> I've been learning about object oriented programming for the past few weeks
> and I've understood it pretty well, but I have one question. Usually with
> PHP scripts I make, all the functionality for a specific page is in the
> actual PH
At 11:18 AM -0500 1/20/10, Paul M Foster wrote:
On Wed, Jan 20, 2010 at 10:11:18AM -0500, tedd wrote:
While I teach OOP, I don't write any OOP for clients. My charge is to
do things quickly and OOP requires a considerable amount of analysis
before creating a solution. In most cases, I don
At 11:31 AM -0500 1/20/10, Bob McConnell wrote:
From: tedd
At 10:26 AM -0500 1/19/10, Bob McConnell wrote:
Some problems will fit into it, some don't.
I teach OOP thinking at the local college and haven't run into a
problem that doesn't fit. For example, in my last class I had a woman
w
Hi Bob,
[Couldn't resist jumping into this topic :)]
Even if you look at traditional unix (or similar) kernel internals,
although they tend to use functional paradigms, they do have a
OOP-like flavor. Example:
Everything in a unix system is a 'file' (well not really with
networking logic, but it
From: tedd
> At 10:26 AM -0500 1/19/10, Bob McConnell wrote:
>> Some problems will fit into it, some don't.
>
> I teach OOP thinking at the local college and haven't run into a
> problem that doesn't fit. For example, in my last class I had a woman
> who wanted to pick out a blue dress for her
On Wed, Jan 20, 2010 at 10:11:18AM -0500, tedd wrote:
>
> While I teach OOP, I don't write any OOP for clients. My charge is to
> do things quickly and OOP requires a considerable amount of analysis
> before creating a solution. In most cases, I don't have the time.
> Besides, I'm more of an agi
tedd wrote on 20/01/2010 16:11:
At 10:26 AM -0500 1/19/10, Bob McConnell wrote:
Some problems will fit into it, some don't.
I teach OOP thinking at the local college and haven't run into a problem
that doesn't fit. For example, in my last class I had a woman who wanted
to pick out a blue dre
2010/1/20 tedd :
> Also IMO, one can argue the advantages that OOP and Design Patterns bring to
> the table over procedural, but after all is said and done, if you know your
> stuff in procedural, OOP is not going to provide you with much that you
> don't already have.
You also have to consider th
Jay Blanchard wrote:
[snip]
My viewpoint may be jaundiced from having programmed in C++, but the
polymorphism of PHP seems a little crippled by comparison.
[/snip]
I wholeheartedly agree, but I figured out how to work with it in PHP to
my advantage and the advantage of my team. It'll get better.
[snip]
My viewpoint may be jaundiced from having programmed in C++, but the
polymorphism of PHP seems a little crippled by comparison.
[/snip]
I wholeheartedly agree, but I figured out how to work with it in PHP to
my advantage and the advantage of my team. It'll get better...
--
PHP General Mai
On Wed, Jan 20, 2010 at 06:47:04AM -0600, Jay Blanchard wrote:
> [snip]
> > Another advantage of OOP that is difficult to
> > provide via the procedural paradigm is polymorphism.
>
> Agreed. Though the advantages of polymorphism are questionable,
> depending on your viewpoint.
> [/snip]
>
> In a
At 10:26 AM -0500 1/19/10, Bob McConnell wrote:
Some problems will fit into it, some don't.
I teach OOP thinking at the local college and haven't run into a
problem that doesn't fit. For example, in my last class I had a woman
who wanted to pick out a blue dress for her upcoming wedding
anni
[snip]
> Another advantage of OOP that is difficult to
> provide via the procedural paradigm is polymorphism.
Agreed. Though the advantages of polymorphism are questionable,
depending on your viewpoint.
[/snip]
In a loosely typed language like PHP that advantages of polymorphism far
outweigh any
On Tue, Jan 19, 2010 at 01:12:49PM -0500, Robert Cummings wrote:
>
> I would have to agree that OOP is not a fad, perhaps over-hyped at
> times, but definitely not a fad. The argument about class dependencies
> is an invalid argument since functions will also have dependencies on
> other functio
Ashley Sheridan wrote:
On Tue, 2010-01-19 at 12:30 -0500, Paul M Foster wrote:
On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote:
Hi,
I've been learning about object oriented programming for the past few weeks
and I've understood it pretty well, but I have one question. Usually with
On Tue, Jan 19, 2010 at 05:44:56PM +, Ashley Sheridan wrote:
>
> Oh, and your flame suit failed because you forgot the quotation marks around
> the attribute values, and you didn't close the tag :p
Dang! I *thought* it felt awfully warm in here.
Paul
--
Paul M. Foster
--
PHP General M
On Tue, 2010-01-19 at 12:30 -0500, Paul M Foster wrote:
> On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote:
>
> > Hi,
> >
> > I've been learning about object oriented programming for the past few weeks
> > and I've understood it pretty well, but I have one question. Usually with
> > PH
On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote:
> Hi,
>
> I've been learning about object oriented programming for the past few weeks
> and I've understood it pretty well, but I have one question. Usually with
> PHP scripts I make, all the functionality for a specific page is in the
>
On Tue, 2010-01-19 at 15:11 +, Ben Stones wrote:
> Hi,
>
> I've been learning about object oriented programming for the past few weeks
> and I've understood it pretty well, but I have one question. Usually with
> PHP scripts I make, all the functionality for a specific page is in the
> actual
Ben,
I use a combination of procedural and OOP in my scripts. It depends on
my needs. As an example, I use OOP for gathering order information. I created
a class which gathers all the order information allowing me to easily access
any piece of data in the order. I could do this with
From: Ben Stones
> I've been learning about object oriented programming for the past few
weeks
> and I've understood it pretty well, but I have one question. Usually
with
> PHP scripts I make, all the functionality for a specific page is in
the
> actual PHP file, and I'd use PHP functions in a sep
Hi,
I've been learning about object oriented programming for the past few weeks
and I've understood it pretty well, but I have one question. Usually with
PHP scripts I make, all the functionality for a specific page is in the
actual PHP file, and I'd use PHP functions in a separate directory which
On Mon, Nov 30, 2009 at 10:27 PM, John Taylor-Johnston
wrote:
> Good grief. It doesn't like printing an INT field like as if it were a
> string??
>
> I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I
> might of in Delphi :)p
>
> echo " $mydata->2010\n";
> echo " $mydata
Good grief. It doesn't like printing an INT field like as if it were a
string??
I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I
might of in Delphi :)p
echo " $mydata->2010\n";
echo " $mydata->2009\n";
Is this something new in PHP? Geez.
John
--
PHP General Ma
Ah, thanks very much. That was very helpful!
James
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2009/7/6 James Colannino
> Hey everyone. I have a question. Hopefully it's clear, because I'm not
> sure quite how to ask it. Basically, I have a variety of different
> objects that a variable can be instantiated as in the same block of
> code, its type being determined at runtime. I want to
Hey everyone. I have a question. Hopefully it's clear, because I'm not
sure quite how to ask it. Basically, I have a variety of different
objects that a variable can be instantiated as in the same block of
code, its type being determined at runtime. I want to be able to do
something like this:
;
>
> Or maybe in your class you did not declare the variable
>
> ex:
> private $var1 = NULL;
> private $var2 = NULL;
>
> Yuri Yarlei
>
>
> > From: ang...@elemental.co.za
> > To: php-general@lists.php.net
> > Date: Thu, 18 Jun 2009 13:20:59 +0200
&g
foo, "string");
Or maybe in your class you did not declare the variable
ex:
private $var1 = NULL;
private $var2 = NULL;
Yuri Yarlei
> From: ang...@elemental.co.za
> To: php-general@lists.php.net
> Date: Thu, 18 Jun 2009 13:20:59 +0200
> Subject: [PHP] Object of class coul
$foo, "string");
Or maybe in your class you did not declare the variable
ex:
private $var1 = NULL;
private $var2 = NULL;
> From: ang...@elemental.co.za
> To: php-general@lists.php.net
> Date: Thu, 18 Jun 2009 13:20:59 +0200
> Subject: [PHP] Object of class could not be conve
Dear all,
We are experiencing this error:
"Object of class xxxClass could not be converted to string"
I have searched google a lot mostly the results are for Drupal or badly
coded sites.
I have further found out that the issue is with PHP 5.2 version.
There isn't a problem with the script as
> i'm really lazy about typing.
I think every good programmer is... ;-)
--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)
--
PHP General Mailing List (
On 5/2/09 6:45 AM, "Robert Cummings" wrote:
> It's not what I want, I'm not the original poster.
as op, i think i'm going to stick with the cast. but it's been an
interesting thread and i learned some useful things.
> Regardless though, it
> comes down to the preference of the developer. It ca
On Sat, 2009-05-02 at 12:10 +0100, Ashley Sheridan wrote:
> On Sat, 2009-05-02 at 06:45 -0400, Robert Cummings wrote:
> > On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote:
> > > exactly, why bother with JavaScript literal representation?
> > >
> > > the foreach loop was just an alternat
On Sat, 2009-05-02 at 06:45 -0400, Robert Cummings wrote:
> On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote:
> > exactly, why bother with JavaScript literal representation?
> >
> > the foreach loop was just an alternative to explicit object cast cause you
> > did not like it I th
On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote:
> exactly, why bother with JavaScript literal representation?
>
> the foreach loop was just an alternative to explicit object cast cause you
> did not like it I though it was more about control over what you want to
> cast and what
php
you have natural type hint over arrays and these are normally slightly faster
so I do not get why you want objects rather than arrays ...
> Subject: RE: [PHP] object literals
> From: rob...@interjinn.com
> To: an_...@hotmail.com
> CC: f...@thefsb.org; php-general@lists.php.net
&g
ou are in PHP, you
> should think about being familiar with associative arrays, also
> because so far is the only class you cannot create/extend.
>
> class string {
> // ok
> }
>
> class object {
> // ok
> }
>
> class array {
> // no way
> }
>
ooops sorry, two more ;-)
> having exactly the same number of characterss.aspx
_
Windows Live™: Keep your life in sync. Check it out!
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009
ray {
// no way
}
Regards
> From: rob...@interjinn.com
> To: an_...@hotmail.com
> CC: f...@thefsb.org; php-general@lists.php.net
> Date: Fri, 1 May 2009 11:40:11 -0400
> Subject: RE: [PHP] object literals
>
> On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote:
>
On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote:
> var o = {
> "a" : "b",
> "c" : "d"
> };
>
> $o = array(
> 'a' => "b",
> 'c' => "d"
> );
>
> so I guess the problem is a couple of quotes, isn't it?
>
>
> otherwise define object statically and externally and use json_
se json_decode ;-)
> Date: Thu, 30 Apr 2009 16:56:21 -0400
> From: f...@thefsb.org
> To: php-general@lists.php.net
> Subject: [PHP] object literals
>
> is there a neat literal syntax for creating objects on the fly without
> defining a type?
>
> whenever i need to do
On 5/1/09 4:54 AM, "Richard Heyes" wrote:
> Hi,
>
>> $x = (object) array('a'=>1, 'b'=>3, ...);
>>
>> which works but isn't very lovely. it's neater in, for example, javascript.
>
> Well, you could wrap it up in a function to make it a bit lovelier. Eg:
>
> $foo = createObject(array('key' =
Hi,
> You could use JSON,
>
> $foo = json_decode('{"a":1,"b":3}');
>
> but I guess that's not much better than Richard's suggestion.
Didn't think of that (well... it's new). That's actually much better I
think, since you get the added boon of ease of portability to JS (if
that's even a factor).
Richard Heyes wrote:
> Hi,
>
>>$x = (object) array('a'=>1, 'b'=>3, ...);
>>
>> which works but isn't very lovely. it's neater in, for example, javascript.
>
> Well, you could wrap it up in a function to make it a bit lovelier. Eg:
>
> $foo = createObject(array('key' => 'value'));
>
> It's n
Hi,
> $x = (object) array('a'=>1, 'b'=>3, ...);
>
> which works but isn't very lovely. it's neater in, for example, javascript.
Well, you could wrap it up in a function to make it a bit lovelier. Eg:
$foo = createObject(array('key' => 'value'));
It's not great, but PHP doesn't have a object
is there a neat literal syntax for creating objects on the fly without
defining a type?
whenever i need to do it i do something like
$x = (object) array('a'=>1, 'b'=>3, ...);
which works but isn't very lovely. it's neater in, for example, javascript.
--
PHP General Mailing List (http://w
On Monday 02 March 2009 20:50:56 Sancar Saran wrote:
> Hello list.
>
> I'm trying to implement someting on OO way.
>
> I got 2 classes
>
> class a {
> var $config = array();
> var $b = '';
>
> function __construct {
>$this->b = new b($this->config);
> }
>
> }
>
> class b {
> var $conf
Hello list.
I'm trying to implement someting on OO way.
I got 2 classes
class a {
var $config = array();
var $b = '';
function __construct {
$this->b = new b($this->config);
}
}
class b {
var $config = array();
function foo() {
switch($this->config['bar']) {
}
}
}
On Mon, Nov 10, 2008 at 9:47 AM, <[EMAIL PROTECTED]> wrote:
>
>> But joins are what relation databases excel at, so PHP would be the
>> bottleneck in your example.
>
> Not always...
>
> If your JOIN can not be easily constrained in the query, until some kind of
> processing of the result set take
On Mon, 2008-11-10 at 14:47 +, [EMAIL PROTECTED] wrote:
> > But joins are what relation databases excel at, so PHP would be the
>
> > bottleneck in your example.
>
>
>
> Not always...
>
>
>
> If your JOIN can not be easily constrained in the query, until some kind of
> processing of th
> But joins are what relation databases excel at, so PHP would be the
> bottleneck in your example.
Not always...
If your JOIN can not be easily constrained in the query, until some kind of
processing of the result set takes place, you can end up with a monster interim
result set that wi
On Mon, 2008-11-10 at 14:29 +, [EMAIL PROTECTED] wrote:
> And there are times when the JOINs for the one-query solution will
> kill you anyway, but with proper pagination, the dozen multi-query
> solution will zip along merrily.
But joins are what relation databases excel at, so PHP would be t
> -Original Message-
> From: Andrew Ballard [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2008 8:04 AM
> To: [EMAIL PROTECTED]
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] object persistence within a session
>
> On Mon, Nov 10, 2008 at 8:55 AM, &
> Perhaps, but the examples I usually find when cleaning up code are of
> the variety where a script executes one statement to find a list of
> parent records, iterates through those records and inside the loop it
> executes another statement (sometimes multiple statements!) to get the
> d
On Mon, Nov 10, 2008 at 8:55 AM, <[EMAIL PROTECTED]> wrote:
>
>> I've found that I don't mind a few well organized database calls per
>> page for the information I need.
>
> Opening up a database connection is very expensive.
>
> Sending one more simple / fast query is dirt cheap.
>
> Time it on y
On Mon, Nov 10, 2008 at 8:55 AM, <[EMAIL PROTECTED]> wrote:
>
>> I've found that I don't mind a few well organized database calls per
>> page for the information I need.
>
> Opening up a database connection is very expensive.
>
> Sending one more simple / fast query is dirt cheap.
>
> Time it on y
> I've found that I don't mind a few well organized database calls per
> page for the information I need.
Opening up a database connection is very expensive.
Sending one more simple / fast query is dirt cheap.
Time it on your system with http://php.net/microtime and see.
--
PHP Gene
On Fri, Nov 7, 2008 at 3:54 PM, Stan <[EMAIL PROTECTED]> wrote:
> Andrew,
> Do I feel stupid!
> Thanks.
Welcome to the list. No need to feel stupid, and you're welcome. We
were all here at some point. Even tedd, who has been programming since
Rocks apparently. :-) At least you read up on the langu
tedd wrote:
> At 7:08 PM +0100 11/7/08, Jochem Maas wrote:
>> Stan schreef:
>>> If this is the wrong forum, please point me at the correct forum.
>>>
>>> I am new to PHP but have 40 years experience programming.
>>
>> cool. we're you around when they programmed with Rocks[tm]? :-)
>> (stick aroun
At 7:08 PM +0100 11/7/08, Jochem Maas wrote:
Stan schreef:
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
cool. we're you around when they programmed with Rocks[tm]? :-)
(stick around a while and you'll get to know
Jochem,
So ... what I did was to experiment with the idea of creating a database
schema that would allow me to define a web page. One row, one web page.
Contained navigation information (bar left, right, bottom, top, none),
title, pointer to the file containing the HTML document for the main page.
Thank you all for your assistance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andrew,
Do I feel stupid!
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stan schreef:
> If this is the wrong forum, please point me at the correct forum.
>
> I am new to PHP but have 40 years experience programming.
cool. we're you around when they programmed with Rocks[tm]? :-)
(stick around a while and you'll get to know that inside joke)
> My initial effort inclu
On Fri, Nov 7, 2008 at 8:33 AM, Stan <[EMAIL PROTECTED]> wrote:
> If this is the wrong forum, please point me at the correct forum.
>
> I am new to PHP but have 40 years experience programming.
>
> My initial effort includes a class definition which needs to persist for the
> duration of a WWW ses
On Fri, Nov 7, 2008 at 8:33 AM, Stan <[EMAIL PROTECTED]> wrote:
> If this is the wrong forum, please point me at the correct forum.
>
> I am new to PHP but have 40 years experience programming.
>
> My initial effort includes a class definition which needs to persist for the
> duration of a WWW ses
>Did storing the object reference not also store the class definition?
No. You need to include the class definition. Take a look at:
http://br.php.net/manual/en/function.unserialize.php, maybe you can use the
*unserialize_callback_func *to load the class definition.
Ângelo
2008/11/7 Stan <[EM
If this is the wrong forum, please point me at the correct forum.
I am new to PHP but have 40 years experience programming.
My initial effort includes a class definition which needs to persist for the
duration of a WWW session. The code (this snippet is the beginning of
Default.php)
$value
On Thu, Aug 7, 2008 at 7:21 AM, Christoph Boget
<[EMAIL PROTECTED]>wrote:
> I knew that there would be some overhead when working with objects vs
> working with arrays, but I didn't expect this much. Is there some
> optimization that I could do to improve the performance any? While
> the script
I knew that there would be some overhead when working with objects vs
working with arrays, but I didn't expect this much. Is there some
optimization that I could do to improve the performance any? While
the script below is just a benchmark test script, it approximates
functionality that I'm going
Hello,
I have a question (what a surprise :-) )
I browsed the archives, but didn't find what I'm looking for.
I have an object instance stored in some variable (like $myobject). I want
to save this instance into another variable (like $tempobject). I thought,
this will be the way:
$myobject
Stefano Esposito wrote:
Hi all,
i've a self-defined class describing an user. In the login page i create an
instance of the user object and store it in $_SESSION['user']. When accessing
$_SESSION['user'] from other pages (of course I do require('user.php'); and
session_start();) i got this er
Hi all,
i've a self-defined class describing an user. In the login page i create an
instance of the user object and store it in $_SESSION['user']. When accessing
$_SESSION['user'] from other pages (of course I do require('user.php'); and
session_start();) i got this errors:
Warning: mysqli::
On Sat, April 28, 2007 3:54 pm, js wrote:
> For me, PHP's issetting or emptying $_GET, $_POST or $_REQUEST is
> cumbersome.
> want it to be more easy and comfortable.
>
> I could say I want a JSP's HttpServletRequest for PHP.
> (http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/
I am missing the point of this 'request' class.
-Logan
> -Original Message-
> From: js [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 28, 2007 2:56 PM
> To: php-general@lists.php.net
> Subject: [PHP] Object-oriented $_REQUEST?
>
> Hi.
>
> I'm lo
ray (or
4 if you include GPC and request) would become unnecessary overhead.
But then again, maybe I am missing the point of this 'request' class.
-Logan
> -Original Message-
> From: js [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 28, 2007 2:56 PM
> To: php-gener
ilto:[EMAIL PROTECTED]
> Sent: Saturday, April 28, 2007 2:56 PM
> To: php-general@lists.php.net
> Subject: [PHP] Object-oriented $_REQUEST?
>
> Hi.
>
> I'm looking for implementation of request object
> that represent a request that works like this.
>
>
Hi.
I'm looking for implementation of request object
that represent a request that works like this.
$r = new request();
if ($r->method == 'GET')
$name = $r->GET->get('name');
$age = $r->GET->get('age');
else if (request.method == 'POST')
$name = $r->POST->get('name');
$age = $r->POST
Hmm.. sorry.. just checked it now, and you're right..
The #id in the dump and the hash given by spl_object_hash() give a
unique ID among the objects instantiated in your process..
If you unset some of the objects, and re-create new instances of them,
you may get the SAME ids you had before..
Every dump of the same node will produce the same #id.
Cloned object, is a separated new object which will have a different id.
The spl_object_hash function produces such an id too (32 hex chars),
which doesn't change if you change the object members.
Richard Lynch wrote:
I suspect that's not
I suspect that's not an "absolute" ID, but just an ID for that
particular dump. So it has no applicability beyond that dump...
On Wed, February 14, 2007 11:31 am, Eli wrote:
> Hi,
>
> How can I get the object ID number of each Object in PHP (v.5.2) ?
>
> The ID number is the one produced when dum
Roman Neuhauser wrote:
How can I get the object ID number of each Object in PHP (v.5.2) ?
http://cz2.php.net/manual/en/function.spl-object-hash.php
Thanks!!! That is exactly what I need... :-)
=== output:
string(32) "eaa76ef5378142caec7b40b56e4b6314"
string(32) "6168ec2b9db13132570a79ef0410
# [EMAIL PROTECTED] / 2007-02-14 19:31:00 +0200:
> Hi,
>
> How can I get the object ID number of each Object in PHP (v.5.2) ?
http://cz2.php.net/manual/en/function.spl-object-hash.php
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you
Hi,
How can I get the object ID number of each Object in PHP (v.5.2) ?
The ID number is the one produced when dumping:
=== output:
object(A)#1 (0) {
}
object(B)#2 (0) {
}
I do not want to buffer and parse the dumped string... Is there a nicer way?
-thanks!
--
PHP General Mailing List (http:/
# [EMAIL PROTECTED] / 2006-10-18 16:28:04 +0100:
> I'm relatively new to object-oriented PHP. I'm loving things like
> Symfony and Smarty etc but really need a little more guidance!
>
> Does anyone know of a good object-oriented PHP course
> available in the UK?
>
> Perhaps something my company
I'm relatively new to object-oriented PHP. I'm loving things like
Symfony and Smarty etc but really need a little more guidance!
Does anyone know of a good object-oriented PHP course
available in the UK?
Perhaps something my company could send me on or I could
do in the evenings.
Many thanks,
On 26 Sep 2006, at 23:52, Richard Lynch wrote:
You start using that PHP5 private/protected stuff, and it just doesn't
make sense to coerce it to an array, imho.
I'm quite aware of that, and in this case I'm using it in a one-off
string-and-glue fix for a specific problem until I fix it prope
On Sat, September 23, 2006 10:39 am, Marcus Bointon wrote:
> On 23 Sep 2006, at 16:37, Ray Hauge wrote:
>
>> Could you do something like this?
>>
>> $private = "Myclass"
>> $protected = "*";
>
> No, because if I have a property called 'Myclassfield1', after
> casting to an array I can't tell if it'
On Sun, 2006-09-24 at 22:26 +0100, Marcus Bointon wrote:
> On 24 Sep 2006, at 22:07, Ray Hauge wrote:
>
> > Maybe you missed it, but he did submit a bug report:
> >
> > http://bugs.php.net/?id=38935
> >
> > He just wanted to see if other people had run into a similar
> > situation before
> > sub
On 24 Sep 2006, at 22:07, Ray Hauge wrote:
Maybe you missed it, but he did submit a bug report:
http://bugs.php.net/?id=38935
He just wanted to see if other people had run into a similar
situation before
submitting the bug... from my understanding. I don't want to put
words in
Marcus' mo
1 - 100 of 310 matches
Mail list logo