@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25



Comments:

<0> Geren: I *DID*
<1> where?
<0> 21:34 < TML> Geren: "Type safe comparison"
<2> It's not his responsibility to find the one way to explain it you'll understand
<1> how is safe comparison = value and type?
<2> most people understand abstract definitions
<0> Geren: == changes the datatype. === does not.
<1> well thats not clear to everyone
<3> Am I that unusual in having read the first couple chapters of the manual before trying to write any php?
<1> but "compares value and type" is absolutely clear
<4> http://pastebin.com/645483 error line 19, with cl*** it can't take $this->dbh; ?
<0> Geren: It is to everyone who has read the damn manual.
<2> Geren: neither is [RainMkr]'s definition
<2> everybody thinks differently
<5> Geren: Well, you could have read it in the manual too... http://us2.php.net/manual/en/language.operators.comparison.php
<1> ok well



<1> thanks
<2> Your option on "absolutely clear" is just opinion.
<2> s/option/opinion/
<0> For example, I don't see any difference at all between what Jymmm said and what I said
<0> We said exactly, precisely the same thing.
<0> "=== doesn't cast the type of its arguments to the same type before comparing them"
<6> redirectMatch 301 /sub/^(.*)$ http://sub.domain.tld
<0> That's a 3rd way to say the same thing.
<6> is that right?
<0> AlleyKat: That's a question for #apache
<2> AlleyKat: this isn't #apache
<6> oh lol true hehe
<6> sry need sleep
<2> as do i
<7> Is it possible to track when users access a page, if they have accepted the cookie to 'remember me'? For instance, a 'whos online' type of thing, even know they dont have to ever login again?
<0> Geren: In fact, what Jymmm said isn't even actually *accurate*. PHP always compares value and type, it's just that == *CHANGES* the type of one argument to the type of the other before doing said comparison.
<2> mizleading: if they never have to login again, then the cookie could sore the fact that they chose that option
<8> if I have a <div width:100%> inside a <div width:75%>, the inner div will be 75 or 100% of the screen ???
<0> mizleading: You'd have to store that state on the server side, using something like a database.
<7> i am using mysql
<2> TML, that's like taking C to an ASM level
<2> it's true, but not applicable
<9> [1ur1]: #web
<0> tempest1: I feel it's eminently applicable.
<8> [RainMkr], THX!
<2> it's not necessary for application and usage
<5> TML: You might want to read the manual, that's where it says it "TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4)"
<10> is it too inefficient to create a form generator that creates an object for every form element?
<10> would it be better to have methods inside a single cl*** to take care of it?
<10> i can definately see that the first method is easier to maintain
<2> majd: that's your choice
<2> we don't know, we can't see your code
<0> Jymmm: Yes, but that's not because == fails to compare type
<4> what's this "bool(true)"
<1> ok
<10> tempest1, i'm talking in theory here...there isn't a "right" way? a way that's standard?
<4> that's what echo out
<5> TML,, now knowing HOW === operats internally is what you're trying to say.
<0> tempest1: I do believe it neccesary for correct usage to understand.
<2> majd, there isn't always a way that is correct in every situation
<4> I ask for var_dump
<3> Froshs: that looks like the output of var_dump
<2> given there are so many different ways the rest of it could be organized
<5> !+KISS
<11> [KISS] Keep It Simple Stupid. Why overthink things?
<0> Jymmm: Actually, it's that you're misrepresenting how == operates that I'm taking issue with.
<5> TML He asked what it is, nowt how it operates.
<10> tempest1, i understand, i just thought that considering this is just a popular script to code, a standard might have surfaces
<10> *surfaced
<5> -w
<2> there's no RFC or anything, every developper does it differently
<0> == compares type, and it's misleading to imply it doesn't.
<2> alot of people swear against PHP OOP programming
<10> anyhow, thanks for the comment...i'll think i'll go with an object for every form element and hope too many people don't access the site at once
<2> *OO programming
<7> Like I have a DB table that has a last_login_on (datetime) and a current_login_on (datetime), and I want to query for both and then other tables such as calendar events, so I can have a 'Whats new' type of thing
<10> why?
<2> TML, why... PHP is an auto-cohersive language?
<5> TML it doesnt compare type, it converts type.
<5> == that is



<0> Jymmm: I *does* compare type
<0> After converting it
<2> TML, The types are always going to be comparable though...
<2> since it did convert it
<0> In PHP, there's no comparison operator that *DOESN'T* check type
<7> Is this possible if i also have a option for ppl to 'be remembered' with a cookie, allowing them to never actually login
<2> so why is it necessary to know what it's doing then?
<5> TML from tha manual "If you compare an integer with a string, the string is converted to a number"
<3> mizleading: just about anything is possible
<5> s/tha/the/
<2> TML, You mean in C++
<0> Jymmm: That's correct.
<0> tempest1: What? No, I mean in PHP.
<2> PHP does compare without consideration to type, PHP's implementation into C++ then to ASM does not
<0> tempest1: No, PHP's bytecode interpreter does not compare without consideration to type.
<0> PHP itself.
<0> However, the rest of your statement remains true, save that PHP is written in C, not C++
<2> but where do the limitations for understanding PHP and understanding the Bytecode interpretor stop?
<2> oh, I was wondering about that
<0> tempest1: They're one and the same
<0> If you don't understand the bytecode interpreter, you don't understand PHP.
<2> TML, not if the problems will never surface, like auto-cohersion problems
<2> TML, You can't say you have to know ASM to know C.
<0> tempest1: I agree with that statement.
<2> or even that you have to understand ***embly
<0> However, PHP is neither ASM nor C
<12> I'm having serious problems debugging a problem i've been having with phpbb. when I go to admin/index.php to access the admin panel I get redirected back to the main index. the strange thing is that I addded some code to write to a text file as the very first line in admin/index.php and it never gets written.
<2> PHP is a higher level language, which goes into a byte code interpretor similar to the C -> ASM model
<0> andre_: Please seek help from a phpbb forum. ##PHP does not support external packages.
<7> CryWolf: how would i insert a persons new login date and time if they dont have to p*** through an authentication processor?
<2> i'm simply making a comparison of when understanding one thing should stop, and understanding the level below it begins
<0> tempest1: There's a p***ing similarity, I suppose.
<3> mizleading: they still have to request pages, right?
<7> CryWolf: of course
<2> That's when.
<0> tempest1: I disagree.
<2> TML, at what point?
<0> I think everyone who writes PHP *NEEDS* to understand the bytecode engine.
<4> http://pastebin.com/645489 line 32, is the result of the mysqlquery not leaving the cl***?
<0> tempest1: I'd say the breaking point is between PHP and the C code that implements the bytecode interpreter
<2> TML, in what situations particularly could that help when knowing just how PHP works wouldn't?
<12> TML Okay, here it is rephrased as a strictly php question... why does $fh = fopen('../files/log.txt', 'rw'); fputs($fh, 'YO'); fclose($fh); at the very top of a php file never get executed.
<2> But obviously the reason the bytecode interpreter always compares types is because C has to.
<0> andre_: Because the PHP code never gets called
<12> but I'm entering the url directly to that php file. where could it be getting interrupted?
<7> CryWolf: so you are saying to put an insert query at the beginning of each page?
<0> tempest1: You're wrong there. It's a bit of a nit, but, just by way of answering your questions, == has to perform more operations in the Zend code than does ===, making == slightly slower.
<3> andre_: alternatively, it's getting executed but it's failing, which you don't know because you have no error checking
<2> mizleading: update the last login part of your database when it's been longer than 6 hours or something
<0> tempest1: Not because "C has to", but because no one has written anything that allows the engine to do otherwise
<0> It's possible
<0> But it's probably not worth the time.
<12> CryWolf: could I just add an 'or die('yadda') to the end of each of those lines?
<2> TML, well, C doesn't have to do much. But to make all datatypes that the bytecode engine is using comparable before auto-cohersion would cause obvious problems.
<2> TML, knowing that === doesn't change types, and == does would tell you which one is faster. I don't have to know that all comparisons consider type however.
<4> Is my result from the cl*** not being return?
<2> Everybody thinks differently I guess, I'll agree to disagree on it since it's not going to get anywhere.
<3> Froshs: see http://kyndimarion.net/debugging.html
<13> hi. is it possible to have two actions in one form?
<14> marcster: no
<4> lol
<14> GET or POST, that's it
<0> tempest1: I don't understand the distinction between the first and second parts of you sentence.
<2> Froshs: just an idea, don't name a cl*** variable the same as a cl*** member...
<13> is there a way i can submit data to two php pages simultaneously?
<2> TML, it's late. I've probably just been up too long.
<14> marcster: no with client-side
<3> marcster: no.
<0> marcster: No.
<2> AJAX methods.
<2> It's possible.
<0> Not simultaneously.
<14> and not with file uploads
<2> TML, true.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#ldap
#gentoo
#iptables
gst-register ubuntu
stresslinux nofb
#mysql
#perl
#sed
pam_keyring ubuntu
hal ivman ethernet



Home  |  disclaimer  |  contact  |  submit quotes