IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-07-25
[16:04]<gnzj>Wolfpaws, even for php4?
[16:04]<ndf>TML, Ah, okay.
[16:04]<luzgpusyjg>Ciaran, you know of it supporting quanity price breaks?
[16:04]<tml>cheater: Because it leaves one with the impression that a string is an array of characters, which it is *NOT*
[16:05]<tml>nero: Use [0] everywhere
[16:05]<tml>nero: It always worked, an dis the right thing to do going forward.
[16:05]<gnzj>Thanks everyone! :)
[16:05]<cyzzzg>purefusion: I'm not 100% sure, but there's a full demo on the site you can look around the admin panels
[16:05]<mdjgdede>Wolfpaws, thanks, didn't know that. I see that on the PHP manual it says [] is preffered
[16:05]<wjlllrws>nero: Well... {} in PHP4 is fine, but since in 5.1 {} is deprecated you should use []
[16:05]<tml>Wolfpaws: Andi is most decidedly the person to blame.
[16:05]<wjlllrws>:)
[16:05]<gnzj>TML- thanks.. just wanted to make sure it wouldn't kill me in php4, as my server is still running it unfortunately..
[16:05]<tml>nero: [] has worked since php3
[16:06]<tml>Possibly before
[16:06]<luzgpusyjg>Ciaran, I'm looking at it now.. there's quite a bit of options
[16:06]<wjlllrws>php/fi :3
[16:06]<cyzzzg>yeah there is
[16:06]<tml>I'm not sure if it worked in FI
[16:06]<gnzj>excellent.. Thanks again1 :)
[16:06]<gnzj>again1/again!
[16:06]<cyzzzg>is it possibly to create an object passing an array as with call_user_func_array ?
[16:07]<cyzzzg>s/ly/le/
[16:07]<tml>Ciaran: I'm not sure I understand the question
[16:07]<tml>"create an object passing an array" doesn't parse well
[16:07]<cyzzzg>call_user_func_array lets me call a function with an array, where the first element in the array will be the first param, the second element is the second param etc.
[16:07]<cyzzzg>I want to do that but with "new Object()"
[16:08]<tml>Are you asking how to pass an array to a class' constructor?
[16:08]<lynzr>what a waste of time being at work when I could be home on my MBP
[16:08]<zxnzvnz>mbp?
[16:08]<tml>Ciaran: php.net/callback
[16:08]<iffzzzgn|fzlvjl>noppo: Possibly, not quite fixed it yet... :p
[16:08]<tml>cheater: MacBook Pro
[16:08]<gjllj>Illarane|Laptop: i PMed you
[16:08]<gjllj>try to use cookies or sessions
[16:08]<tml>cheater: It helps to know what piera's usually whining about
[16:09]<cyzzzg>oh hay you can just call __construct, that should do it
[16:09]<zxnzvnz>TML: only if you're a social worker
[16:10]<tml>cheater: It helps in deciphering her speech.
[16:10]<zxnzvnz>:)
[16:10]<lynzr>I feel like a test subject all of a sudden
[16:10]<cyzzzg>gah no you can't
[16:10]<rrdrdr>more! more!
[16:10]<wjlllrws>lol
[16:11]<tml>Ciaran: What do you mean "no you can't"?
[16:11]<||aw>you can't just adhoc call __construct
[16:11]<||aw>Ciaran: what problem are you trying to solve?
[16:12]<cyzzzg>I'm trying to do something such as: call_user_func_array(array('ClassName', '__construct'), array('param1', 'param2'))
[16:12]<zxnzvnz>he's trying to do something like $x = new foobar($array_instead_of_parameters)
[16:13]<-- 2yd2nzy xrs fuyv>http://iownmymusic.org/ http://iownmydvds.org/ .")
[16:13]<||aw>wouldn't it be easier to modify the constructor so that if an array is passed as the first param it would remap the elements to the param vars?
[16:13]<tml>I see. Yeah, that's not going to work because you can't call a constructor as a static.
[16:13]<tml>You're probably going to have to go ||cw's route
[16:14]<cyzzzg>TML: Yeah I realise, I'd read something on the manual but it was for calling a parent's constructor
[16:14]<||aw>or even just make an extends class that does the translation
[16:14]<zxnzvnz>extend is wiser imo
[16:14]<||aw>depends on where the class is from
[16:14]<cyzzzg>I can't do that, this is for a constructor that will be overridden
[16:14]<zxnzvnz>how overriden?
[16:14]<tml>Ciaran: I fail to see how that changes anything?
[16:15]<||aw>that's what extends does
[16:15]<tml>Any problems you have with func_get_args() you would also have had with call_user_func_array()
[16:16]<cyzzzg>I can obviously just pick the arguments out of the array but I was trying to avoid that as it makes my interface less neat
[16:16]<||aw>yes
[16:16]<cyzzzg>but if there's no way to do what I want then that's what I'll have to dot
[16:16]<cyzzzg>Vbb evals code?
[16:16]<cyzzzg>for what?
[16:16]<lynzr>I have some life changing news...
[16:16]<lynzr>I just yawned!
[16:17]<||aw>piera: did it get you a raise?
[16:17]<lynzr>||cw: sadly it didn't
[16:17]<||aw>piera: then you didn't do it right. go watch office space again
[16:17]<ymwvxsvlm>am i allowed to end php with ?> in the middle of a for loop, write some HTML, then continue the php with <?php ???
[16:17]<ymwvxsvlm>and if so, will the HTML be output the number of times the for loop iterates?
[16:18]<||aw>imwthstpd: yes
[16:18]<ymwvxsvlm>||cw yes to both questions?
[16:18]<ndf>imwthstpd, Yes. :-)
[16:18]<||aw>?> something <?php is just like echo'ing it
[16:19]<ymwvxsvlm>thnx
[16:19]<juhp|snzvyan>how should my mysql query look like if i want to add or substract an int.... $point "+23"; mysql_query("UPDATE `" . $tpref . "users` SET point=point" . $point. " WHERE id = '" . $userid . "'");
[16:19]<juhp|snzvyan>?
[16:20]<rnyfr>that will work
[16:20]<juhp|snzvyan>and $point can be negative too?
[16:20]<rnyfr>yes
[16:20]<juhp|snzvyan>superb .d
[16:20]<cpyzzfnwjzc>hi @all
[16:21]<ndf>Hio kfigglework
[16:21]<wjlllrws>JUHP|Service: You're asking #sql question, actually
[16:21]<||aw>JUHP|Service: it's a matter of how the sql ends up looking
[16:21]<rnyfr>not necessarily :)
[16:21]<rnyfr>there's php in there
[16:21]<wjlllrws>so?
[16:21]<cpyzzfnwjzc>i just wanted to report that this bug here still exists for me in the 4.4.3-rc3-dev snapshot:http://bugs.php.net/bug.php?id=36257
[16:21]<wjlllrws>a little bit of PHP in SQL sentence doesn't make it PHP problem.
[16:22]<rnyfr>*shrug*
[16:22]<rrdrdr>at heart, it's about the SQL, not about the functionality of the PHP in the statemetn
[16:22]<||aw>snapshot:http:// is not a valid protocol
[16:22]<cpyzzfnwjzc>is there anyone who can confirm this - it is marked closed, but it isnt imo
[16:22]<wjlllrws>||cw: :P
[16:22]<curr>I suppose when my server is down, it's a C problem, because the OS it runs on is written in C.







