| |
| |
| |
|
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 26 27 28
Comments:
<0> ...and, once again, why doesn't the documentation say? <1> ...it does <0> not on preg_replace <1> its called the PCRE extension, perl compatible regular expressions <0> Ah, so it is <2> scarfboy: http://php.net/manual/en/ref.pcre.php <3> Preg -> prce [4~(Perl Compatiable Regular Expressions). <3> Aaarg, lag. <0> yay for documentation which leaves a lot of things implicit <0> heh <4> scarfboy: CXIII. Regular Expression Functions (Perl-Compatible) <0> yes yes yes <4> scarfboy: There's nothing implicit there <0> There is if you're looking at the specs for the function <0> It's understandable of course
<0> I may write docs like that myself <4> Yes, if you skip pages, you'll miss information. That's to be expected. <0> but it means I have to look at the page, the parent page, some catch-all pages, etc. <0> not a page <0> many pages <0> that's a pain <5> then rewrite the docs <0> what's more, you don't know what pages <4> scarfboy: That's right, you should read the *ENTIRE* manual, not just the page you choose <0> hahahahahahahah <0> the entire manual? <0> Have you? <0> entire? <4> scarfboy: Yes. I re-read it every 6 months. <0> every little but? <4> front to back, every page. <0> weirdo. <0> anyway <6> tml == weirdo is common knowedge <6> didn't you know? :D <0> Not really a regular:) <4> And yet, I know the language better than most of you...wonder why that could possibly be? <0> Can't you hang a sign on 'im?:P <6> i'm sure it's in the manual somewhere <0> hehe <7> I honestly haven't read the entire manual, but I know where to look for what I need. For anything I don't know I read every detail. <4> scarfboy: It's also "discoverable" which pages you need to read. For example, when looking at php.net/preg-match, you'll see it shows you which reference section to read on the upper left. <7> And yet... I look less stupid than people who don't even know how to navigate the fantastic manual they are given. <8> Hi. $txt = '"some text with escaped stuff \" like \\ those"' <- How to extract text between unescaped quotation marks ? <7> People who don't like the PHP manual obviously obviously haven't read manuals for other languages. <7> s/obviously// <4> The python docs definitely need some "beginning to end" readability help. <3> mg_: preg_match_all("\"((?:\\\\\"|\\\\\\\\|[^\"])*)\""); <9> hi. anyone here use PHPObject, remotin with flash? <7> Navigational capabilities similar to PHP's would be good for Python's docs as well. <10> Does anyone write web apps using MVC? I am trying to decide how large of a project I would need to justify the use of MVC over procedural code. <3> OVERCOMESauceH: Cake! <10> phpCake? <10> I have heard of it, but how large of a project would I need to fully benefit from it. <3> I didn't like it. <8> FauxFaux, will this work for every number of backslashes? <3> mg_: Nobody's managed to break Choob's code that uses that regex yet (http://trac.uwcs.co.uk/choob/cgi-bin/trac.cgi/browser/trunk/contrib/Events.java#L17) :) <8> :] <11> Greetings. Is there a way to alter the object that is returned from a constructor? Vis, change which object is returned? <12> Crell42: you can set object properties in the constructor... <11> Well naturally. I mean return a different object than the new one being created. <12> "new Foo" will always return an object of type Foo. <11> But must it always return a brand new object of type Foo, or can it return an already existing Foo? <12> "new" always returns a new object. <5> seeing as you're using the 'new' keyword, it will always be 'new' <12> If you need something else, you want either a function or a factory method. Depending on how you keep track of everything. <11> Hm. Damn. This won't work, then. <11> Yeah, that's basically what I'm trying to do; put a factory into the constructor so that I can new Foo(1) 15 times and get the same object back rather than hitting the database 15 times. <12> factories don't go in constructors. <11> Typically no, you're right. I was just hoping that I could be clever and not have to go and edit the dozens of "new" statements around the code. :-) <12> Crell42: look at php.net/oop5, which has a chapter on patterns. <11> I recall reading it before. <12> in point of fact, a constructor cannot return anything.
<11> hum. Ah well. Factory it is I guess. <13> Can someone explain this error I keep getting: "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING " I am trying to format the body of an email I am trying to send. <4> skm376: You created a parse error. <14> Is it a good idea always to check referer with submitted forms? <5> Stormx2: i don't bother :/ <14> Hmm <3> Referer is too easy to fake, so no. <14> Cause I was thinking, say I had a profile form, which uses post <14> someone could stick a form on their website with some fake values and post it to mine <5> and they could aslo fake the referrer <14> Yeah I know referer is easy to fake, but not really when you're tricking someone else into changing values <14> I'm never gonna get around people just faking referer <11> Next question, somewhat more reasonable. :-) Given cl*** A{ function foo() {} }, cl*** B extends A{}. if I instantiate $b = new B() and call get_cl***() inside foo(), I get "A". Is there a way to have a function in the parent cl*** "know" that the given object is of a child cl***? <14> thing I'm worried about is people putting forms on their website and either making someone submit it without them knowing, or making JS submit it. That way, you can't send a fake referer, because its all client (victim) side browser based.... <11> skm376: Make sure you don't have a bareword floating about by accident? (Vis, no $ on a variable or a string constant that doesn't have quotes around it.) <4> Crell42: cl*** B extends A { function foo() { parent::foo(); }} <11> TML: I still get A back. <4> Crell42: Then I guess not. <11> Drat. <15> hi everyone <4> Crell42: It makes sense, because you're in A. <16> kuja: sorry, i don't whant to disturb but take a look at #kuja <15> has anyone here modeled a web app in uml before? My specific issue is finding a tool to reverse engineer an app to uml <15> so PHP > UML <15> in other words not code generation from UML <15> but the other way around <4> I've never seen a UML tool that reverse engineers from PHP code, no. <15> rats <17> php > cl*** A { function c(){var_dump(get_cl***($this));}} cl*** B extends A {} $b = new B; $b->c(); <17> string(1) "B" <4> et: Sure, because that looks at the instance, rather than the scope <15> TML: i'm going to be handed a bunch of code soon, and that would make my life a lot easier :) <15> are there any OSS apps that do that for java or c++? <17> TML: isn't that what Crell42 wanted? <15> i only know of some high end ones $2,000-$4,000 <4> et: I thought he wanted it by scope, but you might be right. <11> hm, what? <11> I have common functionality between a couple of cl***es that vary only by one string, which is the name of the cl***. I was hoping to push the functionality completely into a parent cl***. <15> whats the point of spending $4,000 on something that is almost what you want ;-) <4> mick_work: I've never seen an OSS app that reverse engineers UML from existing source, no. <11> Could be fun to write, though. :-) <18> TML: it exists <17> Crell42: have a look at my code... <4> Crell42: The example et gave shows that if you check the instance, rather than the scope, you get the child cl***. <4> common: What is it called? <18> forgot the name, but it exists <4> I've only seen a handful of OSS UML tools, and none of them did RE as far as I know <18> hrm maybe it was not oss <11> Neato torpedo, I can! <4> common: That's what we're discussing. <4> common: I know there are commercial ones, sure <19> I need to do a single sign-on with Active Directory. Can PHP use Active Directory? does it just use standard LDAP? <4> See ads for them every month in DDJ <4> hadees: Yes. <11> OK then... is there a cl*** equivalent of call_user_func()? <11> Vis, instantiate an object whose cl*** is a p***ed variable? <5> Crell42: what do you mean by 'vis' <11> Vis = "that is", "in other words". <5> like IE? <11> Similar. They're both latin-derived. <5> ok <11> </dead language lesson> <20> Crell: You want to just instatiate a variable cl***? <20> $f = new $foo(); <11> hm. OK, this isn't going to work afterall because I have to be in a static context... <21> vis vis is french, a very alive language <11> Pollita: Ah good, it's the simple way. Thanks. <11> rarman1: Yes, but that's an entirely different vis. <21> Crell: ah <20> PERL ****S <20> there... I did it for you <11> I was going to say "French ****s"... <11> Or "Latin is dead!"
Return to
#php or Go to some related
logs:
perc4e/di Dell drivers engage gconf dapper #gentoo wakka bang splat
#osdev SELinux ioncube perl _function_ #lisp #css wu830g ubuntu
|
|