« first day (1272 days earlier)      last day (3900 days later) » 

12:04
@andho Well we have that common ground. The only thing some disagree with then is the reason for a flag... I'm saying that regardless it should've just been deleted anyway with both reasons given
12:20
@Jimbo yea
how to write compound condition like this
if($excel_product['C']=="" || ( $excel_product['C']!="high" && $excel_product['C']!="medium" && $excel_product['C']!="low")) {// do something}
keh
@AmalMurali thanks ! I've succeeded in the first exam ! Now I need to learn for the second one which I have in ~2h
@TheLuckyGoof why don't you use switch/case ?
@KarelG i want to do it in single line
12:22
performance wise, it's uhm ... not approved
@TheLuckyGoof in_array() to the rescue !
^--
Jes
Jes
has anyone tried to include AWSSES for email integration ?
@HamZa can we write compound statement using if?
yes lol
12:24
@TheLuckyGoof yes !
|| (! in_array($excel_product['C'], array('high', 'medium', low))
@TheLuckyGoof if (!in_array($var, array(1,2,3))) { // $var is not 1, 2 or 3
Oh I soooo like the shorthand notation [] for array() :P
especially in js :O
Jes
Jes
nobody has impletemented ?
12:25
meh Python !
@HamZa I always use it, but in here I generally "dumb down" for the fact that so many people are still on <5.4 :-(
wow forgot to add ` ' ` to my low -string
@DaveRandom Yeah, you're right. Otherwise you need to spend another 5mn explaining the notation ...
@DaveRandom : i still know people whom refuses to update their PHP because the chances that their program wouldn't work anymore is high
felt awkward
@HamZa exactly. It sucks but I just prefer to head that conversation off at the pass, as it were
Jes
Jes
12:27
am i ignored ?
I still really want object literals
Jes
Jes
or no body is interested to answer my question
@KarelG & @DaveRandom thanks for your in_array.
@Jes meh, I don't even know or heard about "AWSSES"
I also would very much PHP Storm to recognise that $var = (object) []; gives you a stdClass and not simply "object". Although it also annoys me how many type hints for stdClass there are in our codebase, it's such a pointless thing to do
Jes
Jes
12:30
i want to include email component . and i am working with cake ..hence found AWS ses component ..
for sending email
@Jes Well my answer would be "no I have no idea what that is" so it wouldn't be much use to you...
Jes
Jes
thanks guys let me figure it out
@HamZa i should thank you before all .... thanks
@KarelG Update from what though? If it's from 5.2 or lower then that is possibly true, unfortunately
ah welcome
Jes
Jes
12:31
i am talking about this ..if u guys can take a look
@PeeHaa You front-controller for PitchBlade usually?
@Jes I just checked your question but there is no specific question. Are you suggesting that we should read the whole article without even knowing where you're stuck at ? Or let me guess, did you even try it ?
@Jes was it published pre-2004 ?
> $this->controller =& $controller;
the article says
> by kvijay on April 24, 2012
huarhuar. ignore that website
Jes
Jes
@HamZa no i dont want you to read it .. just that if you look at the topic you may know it
I just followed as said
but not able to send email
12:38
@tereško Yay PHP4 \o/
Jes
Jes
@tereško its 2012
@tereško its 2012
@Fabien yes sir
Don't suppose you have an example of some routing in it? :P
@Jes : just ignore that webpage pls ... -_-
@Jes FYI, since release of PHP 5.0 (mid 2003), you should not be passing around objects by reference .. it's even considered harmful, since it fucks with php's internal refcount
12:46
Good morning
Morning @ircmaxell
@CSᵠ since it has extensive focus on active-record based ORM, the answer would be "no"
mornin'
Jes
Jes
@tereško Thanks for the Info
@KarelG :)
i'm still curious why people is (re)posting working code of 5+ years old
future users might be confused of the published date, which is 2012 while the code itself ...
@PeeHaa Or any mild quick start guide I guess :P
12:52
my "Future of PHP" post has climbed all the way to be my #8 top post all time
^ and that is .. ?
that is what?
(link) :p
ah that. What I really like in your posts - is that you always don't forget to say "IMHO"
12:59
Yeah, it's clear that it's Anthony's opinion on *.
would the readers know what IMHO stands for ? :p
( i do )
washingtonpost.com/business/technology/… <- I love that it blasts big corporations for not doing enough, and blasts OSS. But it ignores that one of the very corporations it cites was responsible for the audit that found this issue. And that they were able to fix it because the source indeed was open.
@KarelG well, the thing is - that @ircmaxell is one of the greatest PHP community members - so he actually can say something about PHP without "IMHO" (because we all respect his opinion and I doubt it will be bad) - but yet in the same time "IMHO" shows that it's just an opinion of one man - i.e. it's a respect for community (and, reader as well)
@tereško what about coupled with mongodb which would be friendlier in that area...
coupled = wrong word :P
13:07
wrong area :)
haha.. agreed that "foo"->bar will never happen. Actually, I hope that it will never happen (:
lol
@tereško Have any links on why active-record pattern + ORM = bad idea?
Is it that entities are aware of their own persistence?
2
A: Going from mysql to mysqli in a painless way

Your Common SenseTo move from mysql to mysqli in a painless way you have to move towards PDO

@HamZa That's kind of a non-answer
@Jimbo no good links on hand (I am a work), but yes - part of the problem is the SRP violation, but also a significant issue is the abuse. While AR implementations give you seemingly intuitive interface for defining relations between tables, the underlaying queries are crap.
I a large scale application you will need to have an option to tinker with queries directly instead of relaying on magic
@CSᵠ noSQL is rarely the "entire solution", because you usually will need more then simple key-value store
13:17
@tereško How about things like a 'Query Builder' - that level of tinkering or lower?
what's the point of a query builder ?
.. think on that for a moment
@tereško precisely. and if it's only key-value issue, then why noSQL? just memcached or something like it
Well.. a query builder exists to create a string via method calls and a fluent interface with some validation I guess?
Has someone a suggestion how I can access in PHP the price 150? :) paste.jesse-obrien.ca/zX
json_decode($array['data'], TRUE)['price']
13:27
Where array = hte object ?
user895378
@Jack hehe someone else said the same thing. How could I forget the greatest operating system of all time, right?
@Duikboot How do you access the 'data' variable in the paste?
user895378
@NikiC Thanks for the explanation. I had no doubt that the design decisions were made for good reasons :)
user895378
morning all
@Duikboot Why do you use this var export non-sense? Paste the output of var_dump($day); ...
13:30
Because it's coming from an ajax call in -_- wordpress
otherwise I'm not able to see the log
you can use "Response" tab to see (in Chrome)
but nevermind
Console is displaying nothing :(
The whole function ls looking like: http://paste.jesse-obrien.ca/zV
I'm assuming the $_POST is "sanitized" O_o
I said give the output of var_dump...
That's var_export, not var_dump?
Anyways, instead of array, use $day->data, might work.
or $day[0]->data
13:36
When I do: error_log( var_dump($day, true ) );
I receive: [10-Apr-2014 13:35:48 UTC]
That's all...
var_dump outputs to browser/command line depending on which you use
it's like echo
print_r = possible var_dump does print nothing to my browser.
view the source, it should be there
Negative.
i fucking hate facebook integration
13:42
what does print_r say ? @Duikboot
This is so annoying :-
json_decode($day->data, TRUE)['price']
?
$schedule[$day->day] = json_decode($day->data); That is the original getting parsed by the WP plugin:
Wich is working.
What I am trying it to access the price and change the value ( I have to add a math formulla before it goes to the front-end )
Good luck.
13:53
@webarto I got it: paste.jesse-obrien.ca/A2
Fire alarm went off. But fortunately we're right next to a cinema so I went in and got a hotdog.
Noice
@PeeHaa Hey, did you have a chance to look at this one? github.com/Lusitanian/PHPoAuthLib/issues/224
@PeeHaa Im just wondering how to proceed, bc I cannot make requests at all to my Etsy store
What is the response you get back from etsy?
14:12
LOL. A client sent us their files we requested. You know how they did it? They sent us their internal hard drive. :P
13
We're all on iMacs too.
so funny
Hilarious.
@Fabien ...because you wanted a couple of days off so you decided to give yourself food poisoning?
@DaveRandom lol. I think if there was more real food in there that'd increase the risk.
14:26
@PeeHaa I get the error that is in the issue... but every single time. However, at some point it allowed me to access
What times in UTC are good for you? @JoeWatkins @bwoebi
To throw out a time, 19:00 UTC is good for me.
> Fixed problem caused by the idiot called "The Past Me" -PeeHaa Commit Message
@LeviMorrison Actually this is dinner time… maybe 21:00 UTC?
Hello everyone. Does anyone know a php library which can be used to create HTTP POST transactions better than but not requiring cURL?
14:34
@DaveRandom Thank you!
np :-)
@PeeHaa Sorry if being dense but what is meant by $pathVariables in PitchBlade?
Man I missed a chance to plug Artax for a question that the actual answer was Artax :(
@Fabien I think you answered that question for me before. that's the reason I asked again... because i remembered that there was something that I could use
user895378
@Fabien meh, who cares. There are a lot of changes that I need to make anyway.
@rdlowrey Yes, plenty more chances in the sea of developers too.
14:55
Good morning :)
fucking facebook
> An error occurred. Please try again later.
^ this NOT helping
That's facebook.
good evenings.
So close to Friday
giddy
Cool
* new error appeared * > PHP Fatal error: Unsupported operand types in
$totaal = ( ($standardPrice / 100) * $discount ) + 50 ;
15:12
hi,

given the nature of phpdbg(targeted for development, separate SAPI, disabled by default, only regular contributors, etc.) I think it it would be fine, but please don't wait too long, as you will lose exposure as you will have less and less time for the users to test it with 5.6 as the release date approaches.

--
Ferenc Kovács
Just got that mail from Tyrael @JoeWatkins … but hurry up!
user3448187
If I "use" a class from a namespace, performance wise am I loading the entire namespace?
@user3448187 No, there is no performance implication anyway even if you were
use doesn't load anything, it simply defines how a name will be interpreted when it is encountered in the code
user3448187
so if I have a namespace star_wars; and I only use class the_empire_strikes_back, then all the other ones are not loaded
user3448187
hmm
@DaveRandom I know how you feel about header(); exit; :)
15:15
<?php

use Foo\Bar; // evaluated at compile time

$bar = new Bar; // evaluated at run time, triggers loading of a specific class
@user3448187 ^
@Fabien Depends where you do it. In general my big complaint would be call exit in a class, in the bootstrap it's not so bad.
What's the reasoning again?
user3448187
@DaveRandom ah I see, I did some testing, so you have to require the entire namespace
user3448187
so technically if I don't use everything in the namespace that would not be good
user3448187
if the page is only about the clone wars, then there would be no reason to load a namespace with all the star wars episodes
user3448187
is this logic correct?
15:20
@Fabien I don't like classes to define the flow of my application. What if I later realise that I want to do something else to clean up before I bail and redirect the user? I probably don't want to have that class suddenly know about this new unrelated clean up task
Furry muff
@user3448187 use doesn't load anything. It's only when you try and actually use a member of the namespace in the code that it goes off looking for it. There is literally no functional difference between referencing the class by its FQN in the code, and importing it via a use statement. It does nothing apart from help with readability by preventing you from having to use the FQN
user3448187
@daverandom thanks, so in my case, a namespace isn't the right choice
It probably has no bearing whatsoever. Namespacing simply helps with organisation, it doesn't affect the way it executes in any way
@PeeHaa Really liking PitchBlade
user3448187
15:26
@DaveRandom Yeah, but you don't want to have to load all the classes right esp when you know you're not going to use them all?
@Fabien The "variables" in the uri path
@user3448187 It doesn't load them all. It doesn't do anything. It only attempts to load a class when you attempt to use it
user3448187
@DaveRandom should I use a namespace XD if I have namespace star_wars; and the page is only about the clone wars and needs class clone_wars
user3448187
@DaveRandom here's the real world example. I have a class for Google_Spreadsheets, a class for Google_Docs. Should I make a namespace called Google_APIs
Yay, I just got +100 rep :D (who did that)
15:32
@user3448187 If you namespace that, you could call the classes Spreadsheet and Doc under the Google namespace, which prevents you from having to write Google 10000 times in your application just to avoid naming collisions
user3448187
@DaveRandom HAZA! Thank you :D
1
Q: Main site 404s Stack Overflow

Benjamin GruenbaumEntering Stack Overflow causes a 404 for me right now. What's up with that? Here are the headers: Request URL:http://stackoverflow.com/ Request Method:GET Status Code:500 Internal Server Error Request Headersview source Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp...

@BenjaminGruenbaum That would be a 500 :-P
Yeah, already fixed :P
FYI I got now problems
*no problems
> ♬ If you're having now problems I feel bad for you son, I got 99 problems but the present ain't one
15:40
@PeeHaa I get the error I posted in the issue github.com/Lusitanian/PHPoAuthLib/issues/224
15:53
@samyb8 You can get the headers by adding var_dump($http_response_header); just after this line
Hey everyone, I am trying to setup a container, so it blurs the image behind it. I am using this method, but am having trouble.
@DaveRandom @PeeHaa pastebin.com/qwLwV0bQ
Those are the headers returned
16:09
@samyb8 I can't help you with that means,you'll have to go back to whoever asked you for the info in that header for that...
@LeviMorrison did you push some changes to the php.net stylez?
@DaveRandom Yes.
Feedback pls
@LeviMorrison In general good, but the dropdown suggestions when you type in the search box doesn't highlight any more (key nav still works but you can't see what you are doing)
@DaveRandom yes, ccing @PeeHaa for that one :) thanks!
Oh actually it does highlight, but the colour difference is like 2 shades or something, it's not really visible
I don't think I touched that bit.
Maybe, but doubtful.
16:13
@LeviMorrison .tt-is-under-cursor I guess would be the thing you've touched, if anything
Yeah, definitely haven't touched that ^^
@LeviMorrison It must have been github.com/php/web-php/commit/…
16:29
@DaveRandom That's some horrible contributing right there ^^
Hello everyone
Good morning
I'm having an issue with Artax
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in Artax/Client.php on line 33
@bdb.jack are you matching the required PHP version?
using PHP 5.3
what is the required version...
>= 5.4
-.-
well that'll do it
How did you install it? Presumably not through Composer?
nope... raw download from the repo on github
@Danack every sane person would use git clone…
16:45
well that got rid of that error
updated to 5.4
now i'm getting Class 'Alert\ReactorFactory' not found in Artax/Client.php on line 33
you didn't download the dependencies...
well i guess it's time to re-clone...
github.com/rdlowrey/Artax#installation … see the instructions: with --recursive option.
what ever happened to the good old days that you could just download the zip file...
user895378
Serious programmers need to be proficient with git.
16:53
oh I love git, don't get me wrong... but i don't like some of the fluff that comes with downloading and using an entire repo including example files etc
user895378
What's fluffy about git clone --recursive ?
the example files that are included in the repository are also downloaded
That's a good thing.
lol
because I always manually write that line and always forget that flag :-D
user895378
Oh noes! 20KB of extra download!
16:54
git should download recursively by default
user895378
@bwoebi I tend to agree.
LOL yes and no. when you want to deploy a project, you need to ensure that all code that isn't in use and isn't yours is removed
user895378
Not sure why it matters.
it helps to reduce security risks
user895378
ORLY?
user895378
16:55
I hope you aren't dropping PHP libs into your webroot.
@rdlowrey there exist shitty hosters who only provide you a webroot, nothing more.
user895378
wat?
user895378
Seriously?
i try not to
seriously. (sadly...)
user895378
16:56
dang.
user895378
I think I'm hopelessly out of touch with ~90% of PHP development.
and btw. beginners do that all the time. (putting frameworks and libs into webfoot)
HELLO I NEED SOME HELP!!!!!
go away
the caps lock key is next to the "a" button
user895378
16:59
@ThatBrazilianGuy WHAT DO YOU NEED HELP WITH?!?!?!?
user895378
WHY IS EVERYONE YELLING?
@tereško LOL
I LOVE LAMP.
@Danack your fetish for inanimate objects is endearing
17:01
@rdlowrey CoUlD bE WoRse.
much w0rs3 4C7u4LlY.
@rdlowrey Regular expressions. preg_replace(), to be more precise.
.. and there goes another entry in the ignore list
did you know that algorithms may be erotic?
0
Q: PHP / SQL Sexy sort field1 by status of field2?

user3520371Greets - I've been getting my feet wet for a while with PHP and SQL combos (adding PDO recently) and am curious if there's a more eloquent way of performing the following: I have a table ('scans') of two [relevant] fields: IDENT and STATUS. IDENT is a text serial number, and STATUS is a specific...

preg_replace('([\w\n]+)([\S\s]+?)("\d\d\d\d)','\1,\3', $texto); issues me a warning:
> preg_replace(): Unknown modifier '(' in <filename>
preg_replace('/([\w\n]+)([\S\s]+?)("\d\d\d\d)/','\1,\3', $texto);
The warning is gone, but no replacement is taking place.
DUH! I had forgot to attribute the result to a variable.
17:19
Hello everyone !
I have an array `$awstats` that I need to extract from this `BEGIN_TIME` to `END_TIME`,I tried this but it doesnt seem to work !

`preg_match("/BEGIN_TIME(.*)END_TIME/is", $awstats, $matches);
$time = $matches[0] ;
var_dump($time); // it displays "NULL" `
@samyb8 Nope not sure. For some reason etsy is always giving troubles.
17:38
PHP.net: Live or Proposed?
I like proposed
user895378
@LeviMorrison I like the Alternative. Also, for a while I've wished the "Change Language" dropdown were somewhere else ...
@rdlowrey Sure. But where?
user895378
17:52
I dunno, maybe at the top of the related function list or something.
@bwoebi and @rdlowrey thanks again for the help - i've gotten it to work finally :-)
user895378
@bdb.jack np. I wrote artax, so if you have questions I'm available to help (within reason).
@rdlowrey first and foremost, i want to say congratulations and thank you. it's a wonderful project and I hope that i'll be able to reach half of that level of skill ;-)
user895378
Thank you. But you might want to reserve praise until after you've used it ;)
@rdlowrey well, so far I only have 1 question: why don't you allow the direct input of arrays into the setBody function? i have some cases where I have POST queries with multiple nested arrays, and i feel that this will become very problimatic without using something like http_build_query
user895378
18:03
$body = new Artax\FormBody;
$body->addField('field1', 'value1');
$body->addField('field2', 'value2');
$request->setBody($body);
i have that, but i don't know (i haven't tried yet) nested arrays
have you tackled that one yet?
user895378
$body->addField('field3', [1,2,3,4,5]);
user895378
Should work IIRC.
what about with associative arrays?
well... i guess i'll find out
but just wondering?
user895378
That should work too, I believe.
18:07
i'll let you know when i test it ;-)
user895378
Actually, looking at the code I don't think arrays will work right now. That's something I could update pretty easily though.
if there's anything I can do to help, please let me know
Hi folks, i'm trying to sort a multidimensionnal array returned by a plugin, till now i've figured how to sort it by date, but if there's multiple "same date" with different time I can't figure out how to sort it you can see the code with an exemple in comment at gist.github.com/jonathanlaf/10408480 thank you for your help !
@JonathanLafleur Have you tried to parse the date with strtotime and then sort?
18:21
i'll have to rebuild a new array no ?
usort @JonathanLafleur
depends on the array... you could just use foreach and add the "time" attribute to the existing key
1 min ago, by PeeHaa
usort @JonathanLafleur
:-)
@PeeHaa could be a solution, just can't figure how to use usort in this case...
moment
18:27
Where's @cryptic?
@JonathanLafleur Gimma a couple of minutes. Food arrived :)
user895378
@bdb.jack You should be all set to assign arrays to form body fields if you clone the latest changes from the repo now.
will do
i'll let you know when i test it how it works out
18:41
Whats up peeps! Can anyone give me some advice on how to apply this blur or something similar to this? I am trying to apply it to this rectangular red area. So it will add a blurred overlay to whatever BG picture is showing.
@PeeHaa it look like it's really complicated, don't want to take all your time ! :o
@TyreeBrown the blur you want to apply need to be done in css is not that complicated
add this :

-webkit-filter:blur(10px);
filter:url(#blur-effect);

to the right element :)
@JonathanLafleur Could you please give me an example of the CSS I should apply? Because I tried alot of variations, and it keeps applying the blurr to the whole class.
@JonathanLafleur I'll give it a try.
@JonathanLafleur no problem finished the food
sec
@TyreeBrown let me a minute i'll tell you where to put it
@PeeHaa okay :)
@PeeHaa take your time !
Something like this is what you want I think
usort($yourArray, function($a, $b) {
    if ($a['date'] === $b['date']) {
        if ($a['heure'] === $b['heure']) {
           return 0;
        }

        return ($a['heure'] < $b['heure']) ? -1 : 1;
    }
    return ($a['date'] < $b['date']) ? -1 : 1;
});
18:48
@JonathanLafleur Thanks! I tried to apply it to my <div id="userpro-profile-background"></div> which is last in its class, but still it blurrs the whole class.
eval.in/135073 @JonathanLafleur
@TyreeBrown let me a minute i'll try it
@PeeHaa thank you i'll try that :)
@PeeHaa Could also re-key with timestamp being the key and then sort by key.
@PeeHaa eval.in/135074 look like it work but how does it sort trough minute :\ ? I see it do it on the output, but you don't have anything on that in the do you ?
It's magic dude.
@LeviMorrison I like it, just switch to us1 'cause that's the best mirror.
Very nice. Version kind of not emphasized. Sometimes I just open the page to check for version.
user895378
@LeviMorrison I like the language dropdown there a lot more!
@TyreeBrown the problem is that you need the javascript with to work, I just read a little bit more about, and you need it to work the way you want it. It will create HTML5 canva to achieve the blur.
Finally, some design ^^
@TyreeBrown look at this exemple, I found it easier to understand

http://jsfiddle.net/nallenscott/WtQjY/41/
user895378
18:56
All the php.net transmutations look great.
@JonathanLafleur I'll check it out, thanks!
@TyreeBrown if you need help implementing it, just let me know, i'll be around
google glass, y u no eye track?
@JonathanLafleur eval.in/135078
@JonathanLafleur Gotcha! Thanks for the help so far though.

« first day (1272 days earlier)      last day (3900 days later) »