« first day (1689 days earlier)      last day (3265 days later) » 

2:00 PM
$success = @mail(...);
$error = error_get_last();
^ Just for quick debugging
 
Yep I tried that, returns NULL
 
Just found a gem in the old system at my company pastebin.com/xY15fgLk (yes, that's a shift "cipher")
 
@DanLugg AJAM - Asynchronouse Javascript And Markup. Or, if you don't understand JS, a literal jam
 
posted on June 01, 2015 by kbironneau

/* by IRoyaLPhoenixI */

 
I also checked my error_log and nothing there
 
2:09 PM
can I ask some help, is there a library to notify the client if there is new message arrive ?I have no idea on this how to accomplish.
 
@PHPLover regarding stackoverflow.com/questions/30575138/…: hover over the downvote button with your mouse and wait for the tooltip to appear. that will answer your comment.
 
@Gordon:But I think it's showing wrong reason since I've tried and put my code too into the question body.
 
@PHPLover apart from that, the error message is quite clear, isnt it? a function cannot be called because php doesnt know it. so you very likely did not include the file containing that function
 
Good morning
 
Morning
 
2:12 PM
@Gordon are you going to IPC this year?
 
@ircmaxell I did not submit because the CfP was too early and I dont know what I should talk about anyway. I might get my employer pay for a ticket though.
I have a budget for confs and I didnt touch it this year yet, so I might as well just go there
 
well, I'll be at the BEPUG next Tuesday (not going to the conf, just the UG)
 
oh, you mean IPC Berlin. no.
wont be there.
 
ok :-/
 
I didnt even know you are at this side of the ocean
 
2:15 PM
I'm not yet
leaving tonight
 
will you be in berlin only or traveling through germany again?
 
France tomorrow, Nantes until Friday, then Como Italy Friday night, Heidelberg on Sat night, then Berlin on Sunday
 
thats all bit too far for a spontaneous visit
 
yeah
I am driving up, but Koln is a bit out of the way for a drive to Berlin
 
yeah, and I wont be around cologne anyways. I'll leave for Munich on Monday morning
til Thursday. Then I head home again.
 
2:22 PM
ah
 
@ircmaxell Are you going north or south of Paris? I'm currently here but it's probably a way out of your way for a coffee.
 
@Danack Nantes
 
Berlin? eh, I'm working on Sunday..
 
I'm there through Wednesday morning
 
:) normal day weeks I'm busy from 7 AM till 10 PM ..
Who can recommend good articles for designing multi-language databases / indexers ?
 
Anonymous
2:34 PM
@ircmaxell Ever been to Switzerland, or any plans to come?
 
@samaYo I went to Switzerland last year for a conference. Stayed in Lugano – was really nice.
 
@samaYo I'll be driving through on Saturday
 
Anonymous
@LeviMorrison ah, yeah Lugano is nice. Bern, Zurich or Geneva is where I would go for conferences, as there are many cool people there to find.
 
So when will you be in Berlin, only on Sunday?
 
Sunday through Wednesday
 
2:41 PM
I see. When on Sunday?
 
late at night
I'm driving up from Heidelberg
 
ok, so probably you will want to rest
If you want, we could meet in lunch time Monday-Tuesday or let's say, after 7 pm Tuesday as I can postpone one of my meetings that day
(:
 
@Gordon patches welcome :)
 
@LeviMorrison in Ardent i noticed that Collection->slice is not compatible with Vector->slice, one returns an iterator the other a sub Vector
 
@Worf Slice is only guaranteed to return a Collection.
Which means they are compatible.
 
2:46 PM
@PeeHaa I can also take away your commit karma :) svn.php.net/viewvc?view=revision&revision=336862
 
@LeviMorrison you are right. nvm then :P
 
@ircmaxell why this week :x … This weekend is referendum in Luxembourg… have to be home then :-S
 
@Worf :)
 
because that's when I was in Europe...
and when I get a chance to meet Nikita
 
@LeviMorrison i didnt notice both enumerator and enumerable were collection
i don't know what to think about them tho. having a slice on unordered stuff is idk
 
2:48 PM
@Worf It is not guaranteed to be meaningful.
(many things in PHP are this way, actually)
 
morning
 
(it's not nice, but at least it's not some new crazy idea; just the same crazy idea)
 
morning
lol @LeviMorrison
thanks for avltree tho :P @LeviMorrison i knew how it worked but i never tried to implement one... reading yours helped a lot :)
 
@salathe OOOooooooh god. I am doomed
 
@Worf Unfortunately in PHP it seems to be slower than everything ^^
 
2:51 PM
it is? :(
 
The custom comparator invoked on every comparison is expensive.
 
ouch, that's bad news
it's the function call itself or the actual comparison that is expensive?
 
The function call is expensive, yes.
Actual comparisons are usually just a simple if/elseif/else or in 7 a <=>.
 
So, Windows is now showing a message to "reserve [a] free upgrade to Windows 10"
 
U so lucky.
 
2:56 PM
i always heard that function call overhead is important in php, but why is that? what makes calling a function so slow?
and, no chances in php7 it's going to be faster?
 
@Danack I just find it very weird to talk about "reserving" upgrades...
 
Yeah, that is odd. Win 10 is free to upgrade
 
@Worf Function calling is relatively slow (compared to not doing function calls) in every language.
 
@NikiC But the latest version seems stable and apparently it will go out in July
 
so @LeviMorrison reordering (say, splice) is always slower on custom implemented Trees than classic php arrays?
 
2:59 PM
Yeah, some languages just have inlining ;)
 
Pfft, them, with their fancy ahead of time compilation....
 
@Worf Not always, no. But often.
Depends on the operation and how "sorted" something is.
I actually plan to write a more efficient sorted set but I haven't had the time.
Well, I've had time I just chose to spend it elsewhere in PHP projects ^^
 
:P
 
Essentially it maintains two arrays: one "clean" and one "dirty"
Whenever you add to the set it just sticks it into the dirty array.
Whenever an operation is done that requires the whole thing to be clean then it cleans the dirty array and inserts it into the clean one.
Then do binary search instead of tree traversal.
This would be faster because arrays in PHP are just faster than a tree for many of these operations.
It's also based on a behavioral observation: when a set is created it is often populated with data and then changed very little over its lifetime.
 
so basically a lazy sorting?
 
3:04 PM
Sure.
It can probably be represented with a single array and an index that delimits where the dirty section starts and I think that might be faster too.
 
37. There are no technical fixes to societal problems.
38. Bitcoin is a technical fix for a societal problem.
 
> Names can be easily categorised by gender.
lol
 
> We now have the one true data representation format: JSON.
 
Does GH load images for you?
And for that matter, bunch of other sites don't work either, hm...
 
3:29 PM
@NikiC They have a caching thing for privacy reasons – sometimes doesn't work as intended.
 
@LeviMorrison Restarted a bunch of stuff around here, now everything works again
 
Morning devs
 
Wondering how anybody can ever use iTunes
it's such a crappy piece of software :-\
 
well... I am an Android user :D
 
@Ocramius s/iTunes/apple software
 
3:39 PM
@Gordon tztz
 
Same. Using iTunes for the first time for some podcasts. Makes me want to scream at the screen. It doesn't even have sorting columns, and its primary use-case is listing things to be played
 
I'll get a macbook for work soon. plenty of opportunity to turn my bias into fact fueled ranting
 
I wish we had some level of type inferring in PHP so that we could directly call internal functions much faster on objects… like $gen->send() could be just an ICALL on $gen and "send" or similar without the dynamic method fetching...
 
I have to make a migration tool for an application. Let me explain a bit. Old application has different db architect and new has different. There are almost 2500 records in table. What I am going to do is:

Make a php script to get data from old sql server and modify the structure for new server and then add each record to new sql server.

I was wondering will it hang my sql server because of too many records?
 
@Rizwan 2,5k records is not a lot… if you had 25 or 250 million records, maybe… but 2500 records? don't worry too much about that^^
 
3:46 PM
@bwoebi Aah, that's a relief. I'm heading forward. Thank you
 
@Rizwan I think I've moved a few ten million records in mysql in a few hours… scale that down to 2,5k records… maybe 2 seconds?
 
Lol, for me 2500 are "A Lot"
 
eih, I meant 2,5 million or 25 million… but the same still holds for 2500 records.
 
a decent server should run > 10k queries per second. If we reduce that by a factor of 10 (to 1k per second), then yeah, 2.5k is 2.5 seconds.
 
@ircmaxell make everything replicated synchronously and you get to 1k max
=D
the joys of working with "experienced technical architects" :D
 
3:51 PM
@Ocramius which is why you only do synchronous replication in very limited circumstances
 
REPLICATE SYNCHRONOUSLY ALL THE THINGZ!
 
@Ocramius you mean people who think of themselves as very experienced, but aren't really?
 
@bwoebi as I said, Technical Architects, yes
 
@Ocramius I have no idea what technical architect means ^^
 
@bwoebi same here... "D
 
3:53 PM
@bwoebi That's the point.
 
ah
 
@bwoebi it means everything, and therefore nothing
 
The ones I prefer most are the "Solution Architects"
Which, by the name, implies that there's also something like a "Problems Architects", no?
 
@Ocramius Both happen to be isomorphic
 
3:55 PM
@Ocramius 2 jobs ago, my official title was "Problem Solver"
 
@NikiC I almost choked, LOL
 
@ircmaxell but I suppose you really solved problems ;-D
 
of course :-P
 
Ah, a solution architect seems to be the guy that causes vendor lock-in
I have a new natural enemy
That should give me +3 on every dice roll against them
 
@Ocramius fwiw, I lol'd
 
4:05 PM
 
lol, can't stop laughing
 
user4349925
I need help guys
 
user4349925
Anyone there?
 
@OnishGarg yes, please?
 
user4349925
I want to click a JS button using PHP cURL or something else
 
user4349925
Any helps, @Rizwan
 
posted on June 01, 2015 by kbironneau

/* by gumibogyo */

 
I don't think that's even possible or not...
you can run js if a specific parameter is in post/get and when running cURL you can send that param
 
user4349925
Like, I login to my account with my login id pass at my suppliers website with cURL
 
user4349925
Then click a js button and record new html source code
 
4:14 PM
Don't they offer an API?
 
user4349925
Nope
 
user4349925
A login and avail service
 
user4349925
That also to make sure that its an actual person.. -_-
 
user4349925
I'm sure developers might've done some thing to bypass that
 
I am being extra stupid today. What is the pear package release builder called? i.e. the thing you run when you have an extension ready to release and want to build the zipball from the package.xml to be uploaded to pecl.php.net
 
4:32 PM
@Danack pecl package
it builds a tarball, though ;)
is a zipball actually a thing? :)
 
Sure it is, it's the same as a speedball I think....
And ty.
 
5:21 PM
Hi all
Somebody please help me
-3
Q: Where and how to write a PHP code for implementing pushwoosh using php-pushwoosh?

PHPLoverI'm a PHP developer by profession. I'm using Ubuntu 12.04 LTS system on my machine. I've installed php-pushwoosh using composer at following location on mhy machine : /var/www/gomoob-php-pushwoosh Now I want to write a program to implement push notifications for iPhone. But I'm not understan...

 
Should a license file always be plaintext? Or is markdown acceptable?
LICENSE vs LICENSE.md
 
@DanLugg just dump the raw text in there, nobody will look at it except a few distros and code duplicators / commercial users,
 
... that doesn't answer the question :-P
 
@DanLugg ...
 
lol
 
5:25 PM
@LeviMorrison was thinking to implement a real vector using splfixedarray. will it work? :P
 
5:37 PM
I wonder why we ever added SplFixedArray
Why not SplArray
It's not like the fact that it has fixed size helps any in PHP
 
SplFixedArray extends SplArray
 
Hi, Need Help

$text = 'Hi #How are you';

Output = Hi <a href="/how">How</a>

I need to extract Hashtag from the $text and then replace it with a link with strtolower and Display anchor tag as it is in hashtag
 
> Being able to check code in at 30,000 feet using Git (or Mercurial etc.) is a feature I shall use, rather than taking advantage of all the free alcohol on the plane to make air travel slightly more tolerable.
BEEN DER DUN DAT
 
5:52 PM
@Srinivas08 Step 1, make a regular expression to match a hashtag. Step 2, modify the regex to capture the hashtag. Step 3, modify the regex to replace the hashtag with HTML. Step 4, look up the term "cross site scripting" and make sure you aren't introducing a vulnerability.
 
@Worf Define "real" vector.
@NikiC Why did we add most of the SPL?
2
 
@LeviMorrison Why did we add SPL at all?
 
@LeviMorrison not sure actually :P
 
@bwoebi Iterators aren't too bad.
Countable is good.
 
because who knows when you will need a RecursiveRegexIterator.
 
6:00 PM
@LeviMorrison no reason why that needs to be SPL.
 
@LeviMorrison That is arguable
 
@NikiC Any reason why one should use Iterators when there are Generators?
 
@NikiC We had Iterator before the SPL. I think most of the bad parts of SPL Iterators come from the bad points of Iterators in general. Do you agree?
 
@bwoebi If you need rewindability
 
@NikiC pheeeew… do we really need that?^^
 
6:02 PM
(Although in retrospect maybe Iterator was simultaneous with SPL. I need to verify that)
 
@LeviMorrison No. I don't think there's much wrong with Iterator (apart from requiring rewind), but there's much wrong with spl iterators
 
@bwoebi Not arguing that ^^
@NikiC I'm not saying they are perfect. What are some points specifically you are thinking of?
@NikiC Just wrap around a caching iterator and we're good to go, right? :)
 
@LeviMorrison Bad usability and bad integration
Like "hey I only accept iterators"
 
@NikiC Okay. At that level of detail I can't really agree or disagree but we don't need to have this conversation unless you really want to. The end summary is "SPL Sucks"
 
Iterator aggregates? What's that? You gotta wrap that in an iterator iterator
Arrays? Never heard of it, I need an ArrayIterator
 
6:06 PM
@NikiC arrays should have been objects grumble grumble
 
You wanna concatenate a few iterators? Just go write a generator for that, it's shorter than actually using the AppendIterator, because you need to construct an object and have separate append calls
 
@NikiC Still needs yield from to be palatable ^^
 
I'll not even mention the good ol' new RecursiveIteratorIterator(new RecursiveDirectoryIterator(.), RecursiveIteratorIterator::LEAVES_ONLY)
 
@NikiC I hate that thing, but it's the only thing which achieves what I need under some circumstances^^
 
@bwoebi I use it all the time, probably the one SPL iterator I actually use
But doesn't change the fact that the whole recursive iterator iterator thing is crap
And then it also has that magic method passthru behavior
Where actually the iterator itself is also the file
 
6:09 PM
yeah, if there's nothing else, even crap is better than nothing ^^
 
And iirc you can't retain a reference to the file because it will go to the next file on the next iteration...
 
NoRewindIterator - all the iterator fuzz without the good parts
$noRewindIterator->rewind(); // now rewind the iterator (nothing should happen)
 
php.net/manual/de/… … Why can I get them, but not set them?
 
Probably can and it's just not documented ;)
 
@LeviMorrison oh, then tell me how?
 
6:21 PM
I was just joking about how little of Reflection is actually documented.
Bad joke, apparently.
 
yeah^^
 
@NikiC that's only DirectoryIterator... FilesystemIterator (and so RecursiveDirectoryIterator) is more sane
 
@salathe cool. why does DirectoryIterator even exists?
Who needs that super magic behavior?
 
@NikiC no-one bothered to deprecated and ultimately remove it
I do wish someone would take the reins of the SPL, rather than gripe about it.
*looks in @Levi's direction*
 
"Yes, Mama. But he was my dog. I'll do it."
 
6:37 PM
Oh hi
 
@salathe I do a lot of work on its hopeful replacement ;)
 
@salathe
 
Bobs-MacBook-Pro-2:Aerys bob$ ~/php-src-X/sapi/cli/php -r 'function a() { static $a = (function() use ($i) {print ++$i; return $i; })(); var_dump($a); } a();'

Fatal error: Constant expression contains invalid operations in Command line code on line 1
:-(
 
err you on freenode too ?
 
@salathe I've also decided that are more important things to work on. For instance, SplEnum doesn't need to exist if we have actual enums in PHP.
 
6:41 PM
@bwoebi that's horrible code anyway
 
@marcio nah, just a test… I basically want to have an expression (a static $var) which is executed exactly once.
something like a constant basically, just function scoped.
I sadly can't add references into a constant (I know, it's good that it's not possible, but…^^), hence I'm not using a constant.
 
@兜甲児 sometimes... why?
 
I see you there
just saying
:D
 
@bwoebi s/*/I basically want a function with global state inside
 
@marcio nope
@marcio I want a compile-time expression.
like a constexpr.
 
6:44 PM
@兜甲児 Ahh, cool :)
 
$className = get_class($object);
if (isset($this->handlerMap[$className])) {
    $this->handlerMap[$className]->handle($object);
}
^^ I feel dirty.
 
makes me wonder about the ?-> operator
 
To do $this->handlerMap[$className]?->handle($object); ?
 
worst
$this->handlerMap[get_class($object)]?->handle($object);
 
Yea, I'm not happy about the type-to-handler mapping being a necessity anyway.
Not in the way it's having to be done for LSP
GENERICS PLZ
 
6:53 PM
@marcio ?-> so if the variable is null, then what? Just nothing?
 
Yea, it no-ops.
 
I love how one bug report from a user can suddenly become a dozen tickets.
 
Hmm... not sure I'm a fan.
 
@Trowski Technically it does nothing and returns null
(so it can chain)
 
"because we'll need it soon"->match_all("#\w#")?->map('trim');
 
6:59 PM
@LeviMorrison @marcio Ooo, I like that. I usually write code so I don't have to worry much about null object variables, but if I had such an operator maybe I wouldn't.
 
with a lot of native functions returning null|false on error this would come handy if we ever get pseudo scalar objects.
 
@marcio yells noooooooo…oooooo…oooo…oo…
 
-.-
 
@Trowski me neither. i would rather have a native Option type
 
Hey, people. Did you already think about post-conditions in PHP?
post-if ::= <expr> if <expr>
post-unless ::= <expr> unless <expr>
 
7:12 PM
@MarceloCamargo you mean DBc?
 
The same we have in Ruby and LiveScript, I mean.
Where conditionals can be applied after the definition of an expression.
echo "Foo" if ($data == 1);
echo "Foo" unless ($data != 1);
 
unless ($data != 1) {
echo "Foo";
}
Unless works the opposite way of if, also.
 
@salathe the link to your companies website doesn't work ;P
 
@Rangad try again :)
 
7:15 PM
@Trowski My opinion: in general you shouldn't be chaining stuff that might be null often enough to warrant a dedicated operator.
 
yep, works ;)
 
@marcio You mean, really take primitive as objects? That's awesome!
"because we'll need it soon"->match_all("#\w#")?->map('trim');

I have a similar implementation for this in my library, but the instantiation of a String object must be explicit:

Maybe(String ("Because we'll need it soon")->matchAll("#\w#")->chain(function($val) {
return $val->map('trim');
}
 
something like that, but with a dedicated syntax
 
My guess is that this will be like named parameters, we'll never have it.
 
because using closures would be madness :P
 
7:20 PM
Using closure with this syntax is madness, but maybe with the new version for lambdas....
 
yes, perhaps it wouldn't look so bad
 
Maybe (String ("Because we'll need it soon")->matchAll("#\w#")->chain((val) ~>
$val->map("trim")
);
In this case, Maybe is a monad, that would perform the same as <expr>?.
LiveScript already has an operation for check by nullability.
foo?bar?baz?
 
@LeviMorrison That was my first reaction too, but I can see where it would be useful for things like ^^
 
7:40 PM
@NikiC Is there any consistency in our grammar for what is a "declaration", "statement" or "expression"?
I'm not seeing it, but sometimes there's just a view I'm not seeing.
 
Well, I believe PHP grammar is consistent in this way.
Expressions commonly can be evaluated to return a literal. Lisp is a language built purely by expressions.
 
@LeviMorrison what?
 
Like when we use the term "declaration" is there a specific meaning? And with "statement"?
I mean, some things are "declaration_statement"s
 
Either declarations and expressions can be inside statements. In PHP, they are the basis, the entry point of the language, but distinguished.
 
I still don't quite understand the question. You do know what a statement and an expression is?
 
7:45 PM
@LeviMorrison, take a look on E-BNF definition:
http://www.icosaedro.it/articoli/php-syntax-ebnf.txt
 
@NikiC In general an expression is something that evaluates to something, such as could be found on the RHS of an assignment or in an if condition, etc.
 
correct
 
It's how we use "declaration" and "statement" that I'm not fully understanding.
Especially because we have stuff like "class_declaration_statement"s too
 
@LeviMorrison In PHP declarations happen to be statements
 
Declarations are also statements.
 
7:48 PM
(Unless you count closures as declarations, of course -- but that's stretching it)
 
stmt ::= | expr | decl | if expr .......
 
So basically we are using _statement at the end so our lines are longer?
 
Well, expressions are also statements in PHP.
 
Good morning
 
@MarceloCamargo Expressions followed by a semicolon are statements ;)
 
7:50 PM
Can anyone tell me why Google DevTools is a good tool for detecting slowness in AJAX requests?
 
$a = $b==1 ? 'a' : 'b'; D:
 
@NikiC So:
1 min ago, by Levi Morrison
So basically we are using _statement at the end so our lines are longer?
For class_declaration_statement?
 
@LeviMorrison Oh, so that's what you mean. Yes, the _statement suffix is not strictly necessary. Though for that matter, any suffix is not strictly necessary
 
class_decl_stmt?
 
7:51 PM
You coulda call it class if you like
 
@NikiC I was just making sure that there wasn't some meaning I didn't understand since that was a LOT of characters if it was unnecessary.
 
(Random aside: Even after all these years, the only use case for unicode variable names that I've found is… demonstrating that unicode can be used in variable names.)
 
Terminology wise this stuff is all okay as far as you understand PHP's grammar? /cc @NikiC
 
yah, it's okay
 
7:58 PM
It seems to accept precisely what I want and reject what I want.
Some stuff is non-sensical like array & int but that's fine.
Mixing & and | requires parenthesis.
At least one type in each sub-expression.
 
If I enable php core dumper (like described here) - how will it affect performance ?
I mean, will each request be somehow checked / traced?
if there will be an impact, how severe will it be?
 
@AlmaDo the only thing which affects performance is having a debug build … by about 100%.
dumping cores only slows down system because I/O upon dumping. (means: when there's a segfault or similar)
 
@bwoebi if there is no segfault, there is no impact, right?
I mean, how it works internally
 
exactly
 
how it checks the request
does it traces everything and dumps only segfault or what?
what kind of IO issues it has?
 
8:14 PM
kernel reads the program space after request to dump it. There's no runtime tracing
@AlmaDo writing the dump itself. These dump files may be quite large. (tens of MB, potentially more, depending on your app)
 
so if there's no no segfaults - everything completely as it is now?
 
yeah
 
hm
Why then it decreases performance - not too significant, but still
(my numbers are tens of milliseconds for "normal flow" so may be fluctuations but still)
 
8:41 PM
Does anyone know a good source for how to do linear regression?
 
Anonymous
9:16 PM
is there a way to alter the behaviour of browsers to modify or hide html tags and elements? Like show a new line \n in the source code
 
9:29 PM
Someone just sent me this: store.steampowered.com/app/370360
@samaYo you mean edit the source code (of the browser) and recompile it :-)?
 
@hamza
@hamza I didn't know assembly was a game but it's all cool
:D
 
@HamZa wtf :D
 
Anonymous
@HamZa kind of
 
I'm tempted to install steam now after several years of no-gaming policy :P
 
does anyone understand linear regression
 
9:34 PM
@samaYo maybe plugin development might help but I'm not sure how far it can edit stuff
@ziGi No idea but googling for "linear regression php" gives some juicy information
 
haha yeah, it's too much, I have studied it but I forgot some things and I could not find it
so I wanted to ask someone who has some knowledge
 
@hamza don't do it ...
It's a one way trip
 
9:54 PM
@ziGi What do you want to know?
 
Having r = 0.996 Pearson Correlation means there is a strong positive correlation of the analyzed data. Is that enough to say that the data used in the linear regression is growing linearly? I mean the dependent data y on the given x. I am doing analysis of amount of requested records "x" versus execution time "y" where I test with 50, 100, 150,... records increasing
I want to apply it on the data that I have measured before and after optimization to show increase in performance but I am not sure how to do it exactly
@NikiC Here is a picture of the results i.imgur.com/WBEjzAA.png
 

« first day (1689 days earlier)      last day (3265 days later) »