« first day (1601 days earlier)      last day (3573 days later) » 

09:00
strlen?
@Ja͢ck Wasn't it on the lists of exts to be removed from PHP 7?
the same way, like google does
@bwoebi Yeah, but not by me apparently :(
What not by you?
@DaveRandom Will see what I can do this weekend
Unless get drunk
Also moring all
09:09
@PeeHaa morning
Morning @PeeHee et al.
@salathe Let's call him @He(e)Pee(s) ?
@bwoebi Remember I removed it from php-src before?
@Ja͢ck no?
Oh, well, I did ;-)
And Dmitry then reverted it.
Ohh, I completely forgot to finalise my resolve on the CSV handling functions
09:32
posted on March 05, 2015 by kbironneau

/* by Kingos */

Question is what to do with the body ...
I would suggest hiding it where nobody ever looks, such as the second page of Google search results.
2
RETURN FALSE;
is this valid?
in php?
valid yes, attractive, no :)
Yeah, I prefer FaLsE
09:47
no I meant the RETURN... didn't know it was case insensitive too
why, god, why?
do you have a smaller picture?
It's animated...
I have a stylish sheet for this: #head-nav .brand img { display: none; }
I complained about but apparently the opinion of the PHP website maintainers is that it's cool or something, and in no way could it possibly be distracting while you're maybe, I don't know, trying to read the manual
@kelunik That is the best one. Y U NO LEIK ELEPHPANTS :(
09:52
@kelunik hehehehehehehe
I don't see the animation...
@PeeHaa Not if they're eye catching and I want to read the docs. ;-)
@FlorianMargaine yeah, a bit harder to do animated screenshots ^^
... well it's top bar…
09:53
@bwoebi nice try ;-)
It's not the first time iether - the site was intentionally broken for last years April Fools Day "joke": bugs.php.net/bug.php?id=66995
Hi I'm having issue with mockery, missing argument 1 :/
can i paste code here?
@Darick I'd suggest you use a gist / pastebin for anything more than a couple of lines
If it's large, put it as a gist, or a pastebin or or 3v4l.org or something
ThW
ThW
10:00
@Darick best way whould be stripping down your problem to a simple example and ask a question on SO. Not sure how many people in this channel use mockery at all.
its a very simple code, check it @thw im learning unit-testing
what frustrates me is why I'm having this kind of issue im using similar code here code.tutsplus.com/tutorials/mockery-a-better-way--net-28097
I'm trying to call a function without a constructor
Ah, my work on ext/ereg removal has been effected \o/
ThW
ThW
@Darick I don't use Mockery. Mostly I use the included PHPUnit API and I have used Phake.
@Ja͢ck \o/
hoping someone could shed some light, I really want to learn how mocking stuffs for testability
ThW
ThW
@Darick You're mocking the class you're testing?
10:07
yes? is that wrong?
I'm trying to follow the tutorial but no luck
ThW
ThW
Yes, you should not do that. (It's a code smell imho)
:/ weird stuff
@Thw
ThW
ThW
You testing the mocked object, not actual one. Sometimes this is needed (abstract classes) but mostly it is a code smell. I you case it show that the constructor of the class contains some logic it should not.
its mocking the class that should be tested
@PeeHaa when don't you get drunk? ;)
10:11
@Naruto Well yeah that is what I meant ;)
@PeeHaa they should make weekends 5 days and workdays 2 days ^^ So we have more time for our personnal projects :P
@Naruto Try running your own business it also gets worse :P
ThW
ThW
@Darick Looks like the model should have been a dependency for the provider.
@ThW in mockery its called partial mock, I read the docs but I can't wrap it to my head, anyway how do you test?
ThW
ThW
This is not a testing but more a programming question, I would inject the model or a modelbuilder into the provider. In the test I would inject a mock of the model/modelbuilder and use it. But the tested class itself would not be modified or mocked.
10:18
@PeeHaa I choose not to go on my own.. Just so I would still have somehwat of a 'social' life after work hours (which also are way to long sometimes...)
Hello Everybody
ThW
ThW
@Darick btw here is an issue for mockery github.com/padraic/mockery/issues/156
I thought for a moment I'd have read Derick…
Please How to add multiple values of an associative array to the same key ?
I have an array $array = array(':hbd:' => 'happy_birthday.mp4', ':wow:' => 'clapping_hands.mp4',); and i would like to link the keys :hbd: to an images url also. Is there a way of adding two values to the same key in an array and latter have something like $array[':hbd:']['happy_birthday.mp4'] that will give me the segond value ?
@FerdineFaithfull Each array key can only have 1 value, but that value could be an array holding multiple values. eg: $array=(':hbd:' => array($value1, $value2)); print $array[':hbd:'][0];
ThW
ThW
10:30
@FerdineFaithfull arrays in php can be nested, the value of an array element can be an array again.
@AllenJB when i copy and paste the code you gave me i get the following error
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in
@FerdineFaithfull Correction: $array = array(':hbd:' => array($value1, $value2)); print $array[':hbd:'][0];
@AllenJB Good. Now finaly, please can i retreive the informations using foreach ($array as $code => $value) ? If yes, please can you give me an example based on that ?
@ThW wow
@ThW Now please can i retreive the information using foreach ($array as $code => $value) ? If yes, please can you give me an example based on what you gave me that ?
Hey quick question:
if i do $jsonUserData 	= $app->request->put('user');

	if(!isset($jsonUserData) ){
ThW
ThW
10:39
is jsunUserData always set because i put the user in it? or wil it return unset if $app->request->put('user') is empty?
@ThW Your code also gives me an error in dreamweaver on the first line
@NikiC ok great :)
@AllenJB Can you give me a way of retreiving information using foreach please ?
@FerdineFaithfull @ThW 's solution should work for you - you may need to replace the short array syntax (square brackets) with "old style" array syntax.
10:44
@AllenJB yOUR solution gives me this the simplest result : happy_birthday.mp4 and my_image.jpg While @Thw solution gives me array(2) { ["video"]=> string(18) "happy_birthday.mp4" ["image"]=> string(18) "happy_birthday.png" } string(18) "happy_birthday.png" array(2) { ["video"]=> string(18) "clapping_hands.mp4" ["image"]=> string(18) "clapping_hands.png" } string(18) "clapping_hands.png"
@AllenJB so if i can have a foreach with your solution that will be great otherwise if i can correct the error in dreamweaver with @Thw solution that will be great
@FerdineFaithfull The only difference between the 2 is that I used (implicit) numeric indexes while he used associative (string) indexes on the 2nd array. You can use foreach in the same way on both.
@FerdineFaithfull I highly recommend you read the manual sections on arrays and foreach. They can explain things much better than I can.
@AllenJB @ThW Thanks a lot to you guys. You made my day !!!
11:12
Shit. I've forgotten to make clean … nice an hour wasted!
(lldb) p generator->flags
(zend_uchar) $6 = '\x03'
(lldb) p generator
(zend_generator *) $7 = 0x0000000101884300
in the one file…
(lldb) p &generator->flags
(zend_uchar *) $9 = 0x00000001018843f8 ""
(lldb) p generator
(zend_generator *) $10 = 0x0000000101884300
in the other one…
well… until I looked that close ^^
@NikiC stacktraces work nicely now. Feel free to review :-) github.com/nikic/php-src/compare/…
11:40
well ... this is fun
I have lost about weeks worth of progress
just because I was stupid with not pushing every single commit
because laptop's fucking hdd died
@tereško You didn't push for weeks?
1 week
but yeah
it's retarded
@tereško Well… I'm happy that I never had a dying hdd or ssd…
It would be some real loss sometimes… :x
I have my dev stuff in my dropbox folder for this reason
@Patrick I once had something similar… git repo was completely borked because I just removed internet connection while it was committing something…
11:58
Hello
for SEO experts :
i know that it is good to make ur site have a friendly URL
for example mywebsite.com/news/
SO why youtube have an old url structure that has parameters
look this is url of youtube : https://www.youtube.com/watch?v=wiNV12JP0jg
12:40
@Bassem it's their choice. plus they are google
Gasp! PhpStorm doesn't like array constants.
They rolled out 5.6 support without actually supporting it?
It wasn't working in 5.6.0RC3 I believe ... so it was added quite late in the game.
It would either say "Parse error: syntax error, unexpected '[', expecting ',' or ';'" or "Fatal error: Arrays are not allowed in constants at run-time"
Is there any way to "use" the \ namespace while in a namespace? (refactoring.. )
Prefixing a few thousand stdClasses, datetimes and other objects with a \ is a bit of a hassle at this point. But I want to move the classes themselves into a application\controllers namespace while keeping the currently used classes in \ for the time being.
Any ideas on how to deal with that ?
sed -i 's/stdClass/\\stdClass/g'
yah.. that just leaves the \DateTime, \ArrayIterator, \<insert random class here> unfortunately..
that said, if you have classes named stdClass or DateTime in your namespace... you're asking for trouble
thing is.. the entire environment is without namespaces atm.. mostly using the zend naming convetion for class names.
this beast is slowly being moved from some crappy old php4-style-html+php+everything-in-a-file junk code.. to something more OOP.
been slowly moving that forward for quite some time.. I have introduced controllers for parts of the code.. we oop'ed a heap of classes.. but now slowly i want to add more structure
So i'm trying to move the controllers in an application/controllers namespace, but those controllers call tons of classes that live in the root namespace
which would mean i'd have to "\" every single instance.. which is incredibly risky.. since missing even one could cause some serious havoc
namespace application\controllers;
use \;
or something would be awesome.. but thats not gonna happen..
13:33
Not sure whether slow refactoring is still viable then.
Have the words "start from scratch" been uttered yet? ;-)
@DamienOvereem you don't have to "\" every single instance...
@DamienOvereem That sounds like a problem that can be solved by using a static code analyzer. PHPstorm comes with one that will scan your code and tell you which classes can't be found.
Yup, PhpStorm can even be configured to make you tea and breakfast in the morning.
@DamienOvereem I wouldn't recommend refactoring like that. Instead rewrite the application part by part (If a route matches, execute new code. If not, go to old code).
13:42
@Jack Some little bird told me that "start from scratch" is usually the worst thing you can do :)
Hi everyone, could anyone explain to me whats happening in my test gist.github.com/rdpascua/…
Guess this wishfull thinking can be thrown in the garbage.. no namespaces just yet then.
i've been banging my head to understand unit-testing
@DamienOvereem usually, but not always.
Thx for your time guys
13:43
I just copied some of the test-suite from the community and manage to get a green for my test, just wondering how mocking works :/
You want us to mock you? ;-)
I wish i could actually use mocking >< The absolute lack of dependency injection in my code makes mocking pointless.. Only basic tests for me at this point.
@Darick What question do you have that reading the documentation doesn't solve?
I've read everything
I just what to understand how Line 102 works?
You mean line 102.
13:47
yes sorry.
Test runs fine, but I want to grasp how this work
I mocked the class Weather and expected to receive a createRecordSet, how does it work? since i did not pass any query, filter, fetch in my mocked class?
Seems i'm going to berlin this June.
i just mocked the stdClass, then it worked.
Mockery::mock('MockingBird');
Jack is on a roll today it seems :)
Mockery::pointAt('Danack'); && Mockery::laugh();
13:51
poor @Danack
wahts that ; doing there
Have you used mockery? @jack
Actually managed to motivate our management to let me and my team head to phpconference.com/2015se/en in June.
Do wonder if its worth it though.. usually not really into conferences.
@Darick I have not; looks fun, though :)
I'm not using any unit-tests, integration or functional tests in my code ever since, its like testing the hard way
13:54
Hmm, June .. I have a wedding to attend in Taiwan at the time ... =/
but since I'm breaking my APIs every development i need to make sure that my api is consistent
@DamienOvereem iirc there will be @NikiC and @SebastianBergmann, should be good :P
@FlorianMargaine Hmm, is Nikita speaking?
I don't know. He doesn't know either afaik.
he's not even sure he's going :P
or are you @NikiC?
Yeh i did see sebastian on the list
13:56
maybe even @ircmaxell will come... maybe, according to him.
Anyway thanks for the time @DamienOvereem @Ja͢ck
@FlorianMargaine Oh, I see him on the detail page
Hmm, that's not how I had pictured him hah
I forgot how young he is.
Sorry I couldn't help Darick.. I have limited experience with Mocking.. since I can't use it myself ><
Niki you mean ?
Yup
13:58
He kinda looks like bill gates in the 80's ;p
Good morning
hello guys
here's a question: why do all tutorials, regardless of the framework, on MVC use blogs as their example apps? WHY?!
shall anybody suggest me over below explain statement
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE m ALL PRIMARY,mem_id,mem_id_2,index_email 15835 Using where; Using temporary; Using filesort
1 SIMPLE n index mem_id,frd_id,mem_id_3,mem_id_2 mem_id_3 16 13269 Using where; Using index; Using join buffer (Block Nested Loop)
Actually my query is very slow
Why not?
14:11
guys jquery pattern isn't working what I am doing wrong? all validation are working perfectly fine
pattern: /^[A-Za-z0-9\w]{4,20}/,
rules: {
password: {
required: true,
pattern: /^[A-Za-z0-9\w]{4,20}/,
},
Define "doesn't work", does it sit around on the couch eating Cheetos and asking for more money all day?
8
"all validation are working perfectly fine" implies that it does, in fact, work.
@Sara That's MY joke!!1!
@Danack Is it? I stole it from Freenode/##php in the 90s....
Or early 00s... can't recall
@asim I think there's a missing brace
@Sara nowadays, almost every application is asking for more money.. I guess we're living in a world, which "doesn't work"
14:16
Well, fortunately most apps don't sit around on the couch eating cheetos. Except when I drop crumbs on my phone and it's next to me...
@MjrKusanagi there are many roles so I didn't put all roles there
MY GOD, THE MACHINES ARE TAKING OVER.
AND THEY'RE LAZY
2
@Sara Isn't that exactly what jQuery patterns are supposed to do?
@asim You still haven't asked your question.
Btw, [A-Za-z0-9\w] is also known as ... \w; and putting upper limits on passwords (assuming you actually anchor your expression) is bad.
14:24
@Sara I don't know what's going wrong with pattern
f**king this shit
The pattern is ... out of control!
@asim To know what is wrong, you must first know what is right.
@asim Define what behavior you expect. Then define what behavior you observe.
That's my koan for the day, btw
@Sara If you could so please
@FlorianMargaine yes I'll be speaking there
Have you tried talking to it? Sometimes, all they just need a little attention and some love.
14:26
"I expect works, but not works"
@asim If I could so what?
so tell me
If you could so would you even?
Tell you what
14:26
what I am doing wrong
@asim What you're doing wrong is not defining your issue well.
@asim Define what behavior you expect. Then define what behavior you observe.
Allow me to illustrate an example, say I walk in with the following problem:

echo "Hello World"; doesn't work, help!

Would anyone in this room be able to offer me any useful advice?
yes.
become a carpenter.
it's all fun and jiggles
and hammers
Exactly. Without a definition of what isn't working, @Florian and others would resort to sarcasm.
@FlorianMargaine what's that?
@ircmaxell didn't you say you'd try to go to phpconference at Berlin?
14:31
I think he may be well-served to provide some context: What is checking these 'roles'? Is this running within a framework? Which framework? Per @Jack's comment (21927512), what you're trying to do in the first place may not be a good idea.
yeah, not going to work out
However, if I expand my issue with "It displays Hello World, but all output after it continues to output onto the same line", then EVERYONE in this room would be able to identify the problem.
ah. Too bad.
As you can see, by adding a definition of what "doesn't work", our ability to communicate has increased dramatically.
Now, you try.
@Sara yes. The problem is that you haven't become a carpenter yet...
14:32
@Florian I'm a shit carpenter. I mean, I can make stuff, but it ain't pretty
Wait... JUST LIKE PHP
php developers shouldn't become a carpenter according to some, with the double claw hammer and all.
BOOM
#micDrop
@Sara If you can make a table out of shit, you have my respect.
I buuuuurn
14:33
Shit and a lot of heat
@MjrKusanagi Ewww
@JoshWatzman I'll set it up for the 19th then, friend request sent on FB, since we use that to organize (will add you to the group)
Speaking of shit, I've just ordered some audio equipment from Schiit ;-)
@ircmaxell no g+? :P
14:36
"Java is Dolores Umbridge, and you know, deep down… you deserve this implementation of generics." -ouch
I loved C++
"If Bash is Hagrid, then the Windows batch file syntax is Argus Filch." -lol
though python? as Harry? eih
You can always tell who writes these lists...
yup, if it was a Haskell dev, it would be harry
14:38
Harry is C++. 'cause he's a mother fuckin' WIZARD
Dumbledore is ASM
> Some people thought that PHP could be turned to greater deeds, and they’re dead now.
I loved ada
Also.... Draco is a WAY underrated character.
Total victim of circumstance.
victim of his father
And where's Cho in this language lineup?
She's got to be Ruby
and in the books, his good side shows through, and you see he's not the "evil kid" the movies portray him as, but a character with depth
14:40
Pretty and enticing, but ultimately unfulfilling
@ircmaxell Right, that's what I'm saying. He's not exactly "deep", but he's less 1-dimensional than the movies imply
And the movie leaves out some pretty vital bits about Snape's story too
about the whole thing
hell, the movie changed the entire meaning of the ending
Like, I dunno, why he actually killed Dumbledore, for instance
Little stuff like that
meaningless details
hmmm... decision decisions
14:44
Do it.
Don't do it.
I will do it, the question is more when
YOLO man, just DO IT
hey guys, I'm trying to explicitly log to apache, but it won't for some reason. I've tried error_log("HELLOOOOOOOOOOOO"); with no result, the file I'm reading is at /var/log/apache2/error.log
yeah... YODO too.
14:45
oh, the other thing is I need to fix a "bug" in PHP (a feature that doesn't work)...
btw log errors are on ^^
@Brunaldo it depends on your setup. What's the value of error_log in your php.ini?
oooh there's an error log
i thought it was just log_error
no error_log is commented out
are you looking at the correct php.ini file?
try running phpinfo()
loaded configuration file: /etc/php5/apache2/php.ini
I'm using this one
14:52
yeah, but check error_log there
; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
; http://php.net/error-log
; Example:
error_log = php_errors.log
; Log errors to syslog (Event Log on Windows).
error_log = syslog
no, I mean in phpinfo()'s output
lol
i'm so stupid sorry
Hmm, I wonder what Harry Potter character Swift would be ;-)
it say's php_errors.log
14:56
@Brunaldo there you go :-)
yaaaay thanks :)
@Ja͢ck Nevil Longbottom. Has massive potential, but is held back by something unknown to him...
iOS. It's iOS.
:)
Speaking of mobile ... forgot to thank the American government for the recent security issues \o/
Well, not so recent, but rather recently published.
Time to program the bread maker, lata
15:03
Is there a way to set an environment variable that is of the type boolean so var_dump(getenv('SOME_BOOLEAN_ENV')); will show that it is boolean? If not, is there a recommended way to go about using flags without boolean?
@crypticツ 0/1
in JavaScript, 21 secs ago, by rlemon
PHP is Dobby. abused for a very long time and then made a free elf. now it is getting better but I'll be damned if it isn't still an ugly sonofabitch.
Everyone is freaked out about AI systems becoming intelligent and ending the world. I'm not worried. I've seen your PHP code.
4
Meh, he writes JavaScript, which is a dementor. A massive, evil, soul-sucking monster that you don't want to get into. Use JavaScript and you'll quickly lose the will to live; soon after being left a soulless husk.
I thought JS might me Belatrix
JS is Harry's parents. long thought dead but in the later books showed up to save the day.
:D
15:10
But still, in-fact, dead.
/harshbuttrue :P
user895378
morning
@MjrKusanagi can't wait to experience the first one that gets stuck in a loop in the middle of something
glitches like in the '90's sci-fi movies
15:28
I am totally stuck
user895378
Molasses, quicksand or the LaBrea Tar Pits?
@JoeWatkins Have you tried turning it off and back on again?
many times ...
can anyone see what is wrong with that ?
Zend is fine with it, opcache borks ...
imagine the last jmp is only inserted when necessary (it < end), because that's how it is locally ...
user895378
@LeviMorrison Thanks for making your leviathon box available ... it's invaluable when I have to do a lot of php-src work :)
==8305== Invalid read of size 8
==8305==    at 0x7247322: zend_jmp_optimization (block_pass.c:1330)
==8305==    by 0x724AA43: zend_block_optimization (block_pass.c:2075)
==8305==    by 0x725385F: zend_optimize (pass5.c:2)
==8305==    by 0x7253B0D: zend_accel_optimize (zend_optimizer.c:586)
==8305==    by 0x7253CAD: zend_accel_script_optimize (zend_optimizer.c:633)
==8305==    by 0x722BAEA: cache_script_in_shared_memory (ZendAccelerator.c:1145)
==8305==    by 0x722CEA2: compile_and_cache_file (ZendAccelerator.c:1478)
I get that opcache can't detect end of a basic block, but dunno why ... if anyone could suggest another way to do it ... or put me out of my misery in any other way, that'd be great ...
15:40
looks like @NikiC is the best one to help you...
it's actually all @NikiC's fault ...
it was his idea !!
guys, do we have a good php+sql tutorial for complete newbies ?
w3schools?
I am actually kinda serious
I am too.
for absolute beginners, I don't know any better, although it's abysmally bad.
15:48
so, is w3schools now teaching people to use PDO ?
otherwise, it is not a valid option
complete newbies = never programmed before, right?
it means, never written php before
15:50
oh, PDO
and mysqli
:21929441 I am tempted to flag you
@tereško I am befuddled.. I was trying to help. What did I do wrong?
When you RDP into a Win 7 box, the mic devices are disabled; is there any way to enable them during an RDP session? I'm trying to stream a/v, but since the mic is disabled (unrecognized) altogether, I can't select it as a device to stream from
@MjrKusanagi those link contained both bad SQL and bad PHP .. and they are fucking confusing for a newbie. Teaching a newbie 3 different ways is a horrible idea.
I need to do something else ...
perhaps be a baker, or a florist ...
15:56
mason ...
I built a brick barbecue once, it fell over one time when I was cooking on it ... very nearly burned some of my nearest and dearest ...
@tereško Fair enough.
@JoeWatkins take out a mortgage and open a bar
I don't own my own house ... I was pretty much homeless 7 month ago ... remember ?

« first day (1601 days earlier)      last day (3573 days later) »