« first day (623 days earlier)      last day (4551 days later) » 
00:00 - 19:0019:00 - 00:00

19:00
stackoverflow.com/q/11276724/477127 <- Possibly the most ironic Stack Overflow username ever.
And it slips in an ArrayIterator which has offsetGet.
@GordonM hahahahah that's great
Which means this extends the class.
@GordonM ready for deletion, cast your votes. ;)
I don't think I have that privilage. :(
Trying to get to the magic 10K rep on PHP questions has become all but impossible lately.
lol
i just hit 1000
considering i joined last week
19:02
Cheers guys chat again soon!
is 10k required to cast deletion votes?
Hello everyone :)
Braintreepayments has the cleanest API for a payment provider I've ever touched
I feel as though I should buy a beer for each one of their developers for the next year.
@sehe Hehe ^^ I had different experiences in the C++ room too ^^ Not all people in there are as nice as you :)
@David Thanks for the reference. I hope they work in Europe well, too.
19:07
@David yes. but they get only usable with 20k
@hakre Braintree? i think they do...they're who github uses
for they're non-open source hosting
*their
but it took me well under a (distracted) hour to integrate their customer/credit card/address storage system in its entirety with my user system
guys, in case your server runs plesk, you should read this: blog.unmaskparasites.com/2012/06/22/…
@David 20k for delete
hey guys, i've just found out the php install on my debian box doesnt have mysqli linked so i cant use the module. I've tried working out what the issue is and i'm sure everything is installed but i cannot find mysql.so -
@Andy what version of Debian?
19:14
do i have to reinstall php with mysqli options or can i just add it? I'm a little confused.
@David i think Etch/Stretch
how can i tell?
@Andy try this, first of all
@Andy apt-get install php5-mysql as root
php.net says i can do ./configure --XXXX but i have no idea how to do that
@David will do, 2 secs
that would be recomiling
recompiling
hmmm
seems that might've fixed it
i could've sworn i did that before 0_o clearly not
;)
19:15
let me just double check before i sing from the rafters
haha
yeah make sure it's there but thanks to the magic of linux package management you should now have an outdated version of that extension to go with your outdated version of php
ok phpinfo is happy :)
the latest debian still has php 5.3.3 in their repo
i don't use the debian copy for that reason...i want my traits!
@David a shame
but still getting 500 errors. 2 secs seems something else is wrong
19:16
@NikiC I know. It's not even the latest version of 5.3
PHP Fatal error: Class 'mysqli' not found in
Passing a IteratorAggregate into an IteratorIterator makes the IteratorIterator extend the class returned by IteratorAggregate::getIterator on-the-fly. Just in case you need that for some wired stuff.
so i guess it sortof didnt work, sounds to me like an include path issue? I havent restarted apache, should i have? [not sure why i need it]
@Andy is
@Andy yes
you need to
@hakre I'll remember that for the one time a month I actually use SPL iterators
`boom
it works :) starts singing ... loudly
19:18
@hakre Iterators are such a mess :)
@NikiC you develop PHP -- you should prod the debian folks until they bother keeping the version up to date
@NikiC we need generators now ;)
@NikiC I was just stumbling over some weirdness in my debugger and thought, this can't be true ;)
last question guys, how can i tell what the apache user is? is it always www-data? or is that just another server setup i've used?
@Andy that's the default on debian
but it varies
as i'm getting permission issues, that's not the end of the world
19:20
@hakre we definitely do
is it a production environment? if not
ok, so getting a list of users can be achieved by doing what now?
yes
chmod 0777 * -R
@hakre what was it?
then don't do that
what type of users?
19:20
@NikiC Well an object of a type had a offsetGet method out of nothing.
? come again? I mean how can i get what users are on the system, you said it varies
ohhhh
so i wanna just double check
users
sorry, braindead
shows who's online
19:21
@hakre óÒ
@Andy you can figure out PHP user with <?php echo exec'(whoami'); ?> which should be same as Apache.
But why would you care ?
See here: codepad.viper-7.com/SDkhsa - scroll down to the end, the comment there. That function. Comes from ArrayIterator which is not in the definition of that class but aggregated.
@Andy to list all users you would cut -d: -f1 /etc/passwd
disclaimer: I'm far from a sysadmin and I doubt that's the best way to do it
If PHP would allow such type of composition w/o traits, would be cool.
@OmeidHerat i'm getting permission errors, i'm just checking to make sure i've setup the groups correctly, i've been running around the system as root for the past 3 hours. which would explain it
19:22
Creating decorators on the fly w/o the need to create so much boilerplate code.
yes it would
@hakre build a generator
@Andy you should hardly ever need to use your system as 'root' the most thing you would ever need is 'sudo' unless you have screwed up things very badly.
@OmeidHerat yes yes i know that. I'm setting up the machine to start with, then will lock it down. It's faster this way
that only leads to problems @Andy
your suggestion worked
19:24
but
your choice
my disclaimer is once again that i'm not even close to a sysadmin
@David can you stop with spamming please ?
@David :) how will i learn if not through making mistakes
@David @OmeidHerat thanks for the help - all working now.
@Andy you're welcome
19:43
$exists  = method_exists($it, 'offsetGet'); # true
$rf = new ReflectionObject($it);
$rm = $rf->getMethod('offsetGet'); # Fatal error: Uncaught exception 'ReflectionException' with message 'Method offsetGet does not exist'
Should this be reported as a bug somehow?
@hakre If you can reduce the testcase a bit more
I'm not yet sure what is going on there
Naturally only with reduced stuff, I'll finish my recursive crap and then try that.
@hakre Looks interesting, how'd you define offsetGet?
I don't define it at all. It's from ArrayIterator.
So you're subclassing ArrayIterator, right? Perhaps $rf->getParentClass()->getMethod('offsetGet'); will yield the expected result?
19:59
guys, 1 question: include "staticPages\$pgdata['token'].php"; can I use variable name like that? if not whats problem?
You know, it's silly; but I think I'll report this as a doc error...
foreach((new ReflectionFunction('trim'))->getParameters() as $p) var_dump($p);
object(ReflectionParameter)#2 (1) {
  ["name"]=>
  string(3) "str"
}
object(ReflectionParameter)#3 (1) {
  ["name"]=>
  string(14) "character_mask"
}
Note the second argument... php.net/manual/en/function.trim.php
whats the error there?
Misnomer. I'm sure there's more.
the doc name is better imho
@epic_syntax $str = "foo {$array['key']} bar"; codepad.org/YhpbDAJ8
20:01
it's not a mask
Either one would be better if they were the same.
@Bracketworks Yeah, keep dreaming ;)
The internals arginfos and the docs mismatch in about 50% of the cases (rough estimate) ^^
@tereško thx vm
Actually, there's larger problems afoot, with respect to manual inconsistencies.
4
Q: PHP core function arguments; manual says reference, however it accepts values

BracketworksI've noticed some inconsistencies in the PHP manual; a number of core function signatures are documented to accept arguments by reference, however they accept arguments by value. I posted a more specific question previously, and @cweiske provided a great answer (with reference to the pertinent P...

Ah, they changed array_replace_recursive()
Btw, the answer at stackoverflow.com/questions/6992359/… seems like complete BS
20:10
Hiya all!
The code there doesn't have to do with references. References aren't handled in the function code but in the arginfo structs
And for current() it is PREFER_REF: lxr.php.net/xref/PHP_TRUNK/ext/standard/basic_functions.c#291 I.e. it'll take both
Can someone here explain to me how when you google a question and it comes up with a SO answer, the meta description tag highlights the part of the page that is relevant. How is this accompished without SO using META tags?
@NikiC I forget why I accepted that answer; I don't know enough about internals.
@x3ro No I don't subclass ArrayIterator, however I will test for what you suggest, good idea.
If you have a better answer, please go ahead. I'll happily accept.
ZEND_PREFER_REF ... it "prefers" references, but'll take values?
20:18
@Bracketworks Nah, I just added a comment
@Bracketworks If you pass a var it'll handle it as a ref (e.g. separate the zval if it was a value previously), but it will also work on non-variables
I'm not exactly sure why it was made PREFER_REF
I always wondered about that
@NikiC Again, don't know enough about internals, but that sounds <strike>stupid</strike> like a bad idea. It should be explicit, one way or the other.
It could be so you could use the current() family of functions inside foreach loops without the two interfereing
@Bracketworks: You might love this question: stackoverflow.com/questions/6726589/…
oh yeah, one of my favorites
Damn, it's not fixed in 5.4.3.
20:28
hiya I'm waasted don't mind me
@PeeHaa We're used to that ^^
@PeeHaa Ballmer peak. Test case, now.
evening folks
plays terarria
lucky you
migrating doctrine 1 to 2 :[
20:36
i think that's covered under "cruel and unusual punishment"
it will be fun they said
I would like to rewrite entire app, but I can't get permission, so I have to bare with PHP written by Ruby developer...
in Zend Framework + Doctrine 1
#fml
anyways, enjoy your game :)
lemme guess .. everything static
Okay, now I've finally reconciled some of my earlier issues with RMR I think I've got an overall architecture I'm happy with and can start refining.
If anybody wants to review and comment, lucidchart.com/documents/…
20:56
fails to load in opera
@Bracketworks I think I ort mysphone mothonr tonight (neeedd to check tmorowwo) Hoe's thats for a be;lammerr\ peka
So much for cross-platform then!
It claims to work in Opera too.
I assume Opera supports PNGs at least. cloud.github.com/downloads/gordiansolutions/reefknot/…
i am stuck at "Loading .."
On lucid or on github?
oh wait
nevermind
managed to get it to load then?
21:49
@GordonM Can you add pseudo file-system wrapper in which the first part of the path represents the database, the second the table and the filename is a combination of primary key and the return type? To get a list of all users, dir: /data/users, to get one specific: /data/users/122.json and such ?
@hakre Sounds interesting, though at the moment I'm more concerned with the front end bit of the system, namely the front controller, interactor, representation, etc. The back end of the diagram is more in keeping with showing a typical applicaiton architecture.
Probably something to consider though.
@GordonM Why don't you leave it out? I mean that could be something that somebody who uses the framework could implement.
Often those things change / are that specific that it's not worth to framework them.
Purists would probably argue that you should access a database like a database and a file like a file though.
@hakre Good chance I will be leaving that out. Like I said, the main focus at first is a working RMR so I can evaluate it against MVC
22:05
@GordonM Then better just do a simple example application as the first use-case ;)
That's the plan yeah, just wanted to diagram some typical app. The coloured items are the only items of interest, and honestly, the only difference between the "resource" and the other collaberators in the diagram is that the resource is the one that was targeted by the request.
And the internet's gone screwy again. :/
I think this room needs more people
22:27
just found a masterpiece of class oriented programming, I especially love the autoloader: github.com/recurly/recurly-client-php/tree/master/lib
it was not clear to me, that there are folks out there that static-fy everything ^^
Trying to actually find the autoloader!
... oh. Lovely!
this is a joke, right
@webarto yeah it's a joke, but probably not intentionally.
hello geeks
I found something really important but I had missed
http://stackoverflow.com/questions/11275902/bug-php-pre-increment-and-post-increment-variable-for-array-keys/11275903#11275903
22:43
hi @rasanga! great to see it's now clear to you!
yeah, thanks to you I found the correct explanation :)
23:30
Can anyone look at this answer? stackoverflow.com/a/11278245/978733 Getting error
@epicsyntax , if you cannot find a missing or extra ) , then maybe you should try a different hobby
maybe gardening or beekeeping
2
@tereško beekeeping :)
23:49
Guys, please take a look screencast.com/t/12TczNELYX What am I missing here?
@tereško you sorta funny guy?)
@epic_syntax , you are missing basic tutorial
@tereško you mean $ signs?
did you try ?
@tereško yes tried, now I'm getting another error
@tereško stackoverflow.com/a/11278245/978733 take a look at this answer
Can you see any problematic place other than $ signs?
@tereško so?)
so what ?
23:58
@tereško Have you read?
did you try the code ? was there an error ? then make a paste in codepad and share the link which illustrates the error
class common {
    var $db;

    public function __construct() {
       $this->db = db::get_instance();
    }
I'm calling like this from another class
00:00 - 19:0019:00 - 00:00

« first day (623 days earlier)      last day (4551 days later) »