« first day (2244 days earlier)      last day (2704 days later) » 

11:00 AM
What does nsprotected do?
What namespace? The current? One up?
 
@Wes I agree that inner classes are not a feature we totally need because you can achieve almost the same with regular classes. But I don't follow your reasoning that the concept as such is useless.
 
Wes
if Foo is declared in namespace Bar\Baz; those methods would be callable only within Bar\Baz, including subnamespaces
 
Strange.
 
So \Thing\Package\Sub\Implem.php doesn't have access to \Thing\Package things?
 
Wes
basically like in java
 
11:02 AM
@Wes if someone will use your library and see nice implementation of your internall stuff in regular class (because ther is no protection currently) and will couple his code with your library to do not copy&paste, then you'll retrieve plenty of issues when will change something in library which provides BC, private access protects your implementation against nobody uses it outside your namespace/package whatever
 
Wes
@brzuchal actually i would like that kind of thing. i only disagree with your solution :P
nsprotected (protected in java iirc) would be more than enough for me...
 
nsprotected is different feature for me
 
Wes
iirc in java protected means "can be accessed by all the package and subpackages" while private all the package but not subpackages. right?
 
there are PR which are on hold
 
@JayIsTooCommon Meh @kelunik isn't that strange
 
Wes
11:06 AM
/me now dodges this conversation and goes back to writing code :B
 
AFAIR in Java there is no protected scope for classes
 
Wes
@bwoebi i forgot to cc you here news.php.net/php.internals/97318 thoughts?
also morning :B
 
@bwoebi Not from you pov. you're a frenchgermanbelgian
 
@PeeHaa He's none of those.
 
He's all of them. When it comes to countries it's a bastard :P
 
11:14 AM
What makes a man turn luxemburgian ... Lust for gold? Power? Or were you just born with a heart full of luxemburgianess?
 
Laravel does, in fact, act as an MVC framework... so I'm not sure what you're getting at, exactly. Your comment is relatively vague. Eloquent ORM is an additional feature for interfacing data.... eloquently. My answer is to help point OP in a direction of resources versus writing a book on SO. — Half Crazed 16 hours ago
 
Anonymous
Go @tereško, get him !!
 
@PeeHaa Oh god...
 
Anonymous
Ah that explains it, he's from Manchester
 
Jesus. Did anything good ever come out of manchester?
I cannot think of any single thing
 
11:24 AM
@PeeHaa well, I was there for a conf once and then flew home again. Does that qualify?
 
Depends. How long have you been in there? I'm not 100% on the incubation time
 
@Gordon Bahaa
Chris has been there spawning bullshit for a long time
Speaking of which...
@DaveRandom any plans on your next talk?
 
I rather want to know about his plans to stop talking tbh
 
!!dad
 
I just watched a program about beavers It was the best dam program I've ever seen
 
11:36 AM
Manchester is totally the best.
3
 
At what?
 
@Jimbo not til the new year
@Leigh being the best
 
WHo's that other person in manchester?
 
Anonymous
@DaveRandom i'll smile at you if you unpin this @bwoebi
 
@DaveRandom they suck at diversity which is obvious from the name already
 
11:43 AM
@Gordon It's a thing you do to a girl. "Why don't you man-chest her?"
 
@DaveRandom I demand the city to be renamed Womanchelsea!
@DaveRandom isn't that technically called spanish? so rather where @Jimbo is now?
 
> * Excess found in a non pipelined read: excess = 5552 url = /service/PersonService?wsdl (zero-length body)
^ that is a problem on the other side right not my side?
It's curl verbose outputbtw
 
@PeeHaa complaining about a person's zero-length body is body shaming. stahp it!
 
user7029249
0
Q: change dropdown value & save in database - No record selected

abcdwe are displaying orders in custom orders.php page in www.1234.com/site6/orders.php I am trying to change status of each order from Paid to unpaid or returned or viceversa..... i can select required status & click on "submit" button & it displaying "NO record selected".... php function ...

 
@Gordon Pfft, impossible standards these days
 
Anonymous
11:57 AM
sticking flash messages in a class (array) const FLASH_MESSAGES == smelly?
 
@HalfCrazed I really hate to break this to you, but Laravel really has no relation with MVC. Frameworks as such do not implement application architecture to begin with. Ya know, the hint is in the name - application architecture. To be honest, Laravel is a really terrible framework, that abuses various technical terms for the purpose of advertising. And as a side effect, it causes misinformation to be spread. — tereško 10 secs ago
 
@JayIsTooCommon how can they be const?
Or do you mean the identifiers which get replaced by the actual messages?
 
12:17 PM
@PeeHaa Are "lots of drugs" a good thing?
@Wes They can......RFCs have no rules about what they can or can't do. It's just that adding features to point releases is kind of annoying to deal with.
 
@JayIsTooCommon not immediately, I'm very sorry.
@Wes We still need $that = $this, just to access the exterior object. outer is an alias to the outer class name, pretty much like a self is an alias for the current class name.
@Wes and outer::$this would be accessing a static class var, not a property.
@PeeHaa meh, we're obviously superior to all these, and also to the Dutch.
 
12:33 PM
@bwoebi That could be changed.
 
@kelunik uh, please no conflating of syntax meanings
 
Wes
@bwoebi i meant that as outer scope, not class
 
@Wes I got that, but… it's weird.
 
Wes
and regardless how you do it, you'd still need to alias outer "$this" to another var
 
I am a proponent of explicit scope passing (like you explicitly forward Closure shared vars)
 
Wes
12:37 PM
how about use($this as $that) ?
 
I'm not sure.
 
Wes
@bwoebi
class Foo{
    public function bar(){
        $foo = 22;
        return new class{
            public function test(){
                $foo = 33;
                return new class{
                    private $parentParent = outer::outer::$this // Foo
                    private $parentParentFoo = outer::outer::$foo; // 22
                    private $parentFoo = outer::$foo; // 33
                };
            }
        };
    }
}
with use() that would look crap
 
outer::outer ?? seriously, that shouldn't even be possible…
 
Wes
it must be consistent... not that one should abuse that
 
@Danack Yes totally
 
12:47 PM
class Foo{
    private $foo = 22;
    public function bar(){
        return new class{
            private $parent = $this;
            public function test(){
                $foo = 33;
                return new class{
                    private $parentParent = $this->parent; // Foo
                    private $parentParentFoo = $this->parent->foo; // 22
                    private $parentFoo = $foo; // 33
                };
            }
        };
    }
}
 
@bwoebi :P
 
@Wes i.e. property definitions would have full access to the defining variable scope
 
Wes
$this-> in a class refers to that class, not the class that defines it. please :B that sucks
 
@Wes $this does, inside the methods.
 
Wes
what if you guys improve constant expressions so that they allow $this use?
class Foo{
private $bar = "crap";
private $shit = $this->bar . "foo";
}
 
12:51 PM
@Wes we wouldn't
It'd make sense to static methods/vars (self::), but not to non-static ones
 
@Wes you'r mixing variable which lives after creation with class declaration
 
Wes
it's terrible regardless, "$this" within the braces of class{} refers to that class, not the outer one
 
@Wes disagree.
@Wes $this is a magic variable only defined inside non-static methods
 
Wes
how can you disagree with that :B
 
@Danack can we start with voting for object types ?
 
12:54 PM
$this does not exist inside static methods, nor does it at class definition time.
 
Wes
@bwoebi you are watching it from an internal perspective. to the average user that would be confusing as hell
 
[] operator not supported for strings
damn legacy code... all I wanted was 7.1 :*(
 
@Wes I'm not. From an internal perspective $this may exist inside static methods, but that's another story…
 
Anonymous
@PeeHaa so pastebin.com/wp1vcXQF like that
 
@JayIsTooCommon Those belong in a translation file imo
 
Anonymous
12:58 PM
@PeeHaa that's the one, I knew there was a better approach. Cheers babe
 
<3
 
Wes
@bwoebi okay but seriously class{ private $foo = $this; } with $this not being of that class is like the most confusing thing you could have. it surprises me that you think it's not...
 
@Wes It's pretty obvious once you just consider all the variables of the parent scope in that class property definition scope.
 
Wes
anything becomes obvious after you vomited all the necessary. in this case a lot :B but it's just my opinion...
 
Anonymous
@bwoebi Your loss :(
 
Wes
1:03 PM
and, as many things in php, i would get used to it but will never stop thinking that is stupid :P
 
Anonymous
@DaveRandom Wanna try and schedule another time for GH status fixing?
 
@Wes I disagree on stupidity, but oh well.
 
Wes
@bwoebi how about properties
class Foo{
    private $baz = 10;
    public function bar(){
        return new class{
            private $baz = 5;
            var $baz1 = {
                get() => $this->baz;
                set($v) => $this->baz = $v;
            }
            var $baz2 = {
                get() => outer::$this->baz;
                set($v) => outer::$this->baz = $v;
            }
        };
    }
}
 
var!? You filthy PHP 4 user
:-P
 
what is this?
 
Wes
1:10 PM
<ins>very much</ins> hypothetical get;set; syntax
 
what language it is? property getters and setters
 
@Wes these property accessors failed already at least 3 times…
 
there were 3 different RFC's for that AFAIR
 
Wes
yeah, we can't have nice things
 
There are plenty of different nice to have in PHP things like inner classes, private classes, package scope, compiled code, generics, enums and annotations, etc..
 
Wes
1:22 PM
i keep breaking tests of stuff i haven't touched in months... i don't know why
 
arrayOf[]...
 
Wes
@Jimbo that is part of generics
 
@Jimbo oh, you're a room owner now
 
Wes
$baz = <int, Foo>[new Foo(), new Foo(), new Foo()]; // syntax that annoyes @bwoebi
 
@Wes indeed.
 
Wes
1:25 PM
:B
 
Array<Foo>(new Foo())
 
@bwoebi Yes... it was bloody annoying.
 
Which... has different issues.
 
@Jimbo you mean, not being a RO?
 
hi
First time here, so I don't really know how this chat works
 
1:28 PM
@bwoebi After being in here pretty much every day for the past 5 years and still having to ask to get something pinned, and having it revoked as soon as I got it last year? Sure :-)
 
someone a little time to help a php noob?
 
@Jimbo Ah, sure I agree
 
hello?
silence
0
Q: php globe array, separate first file of directory from

user3799112I'm trying to get .php files in a directory to an array using globe(). Works fine. Than I would like to have the first file in one div and all the others in another div. <?php $files = glob("kalenderitems/*.php"); $num_files = count($files); $i = 0; ?> <div class="kal-item-<

 
@user3799112 you already got an answer…
 
you r faster than my browser :)
 
Wes
1:33 PM
Time: 43.21 seconds, Memory: 90.00MB
OK (9709 tests, 159148 assertions)
\o/ http://i.imgur.com/sTXwc12.gif
 
going to have a shot at it
thx
not quit solved
the solution does not put out the structure I wanted. And puts out the first element also with the others
 
ThW
Morning
 
hi
how are you
?
 
1:49 PM
hi
M fine
 
@Wes lol
 
Is any know how to lock browser screen using php ?
 
define lock
 
OK, in future I dont want user to keep refersh the same page, so once screen has been lock, use can not refresh that page until system will release screen lock
 
The only thing i can think of is the classic "u sure u dont want this offers?" popup that wont let you leave page, but thats javascript
 
1:54 PM
Yeah, that is javascript but want use PHP code stricly
 
as far as i know, PHP ends interaction with the browser when the page finished downloading and it cannot control its behaviour
 
Yeah, thats right
I have an issue reagading doctrine manager, may I ?
 
Anonymous
don't ask to ask, just ask :)
 
lol
 
Anyone have experience with "url_rewriter.hosts" in PHP?
 
1:56 PM
you can, however, with javascript, tell the browser to ignore the reload request
but it will only work if the user uses f5
 
Whenever I am going to execute query it reflect with "exception 'Doctrine\ORM\Query\QueryException' with message 'Too many parameters: the query defines 1
parameters and you bound 2'" this message
 
@Alesana glad you like it. :) I'm a fan of his music. The album that song I linked you to is pretty good. Check out Lost in the New Real if you haven't yet.
 
Whats the calling line?
 
@KartikPatel you only have 1 placeholder in your query, but you tried to bind 2
 
$parameters = array('departmentId' => $departmentId);
$qb = $this->createQueryBuilder('p');
$qb->select('p.productId', 'p.productName', 'p.productNumber', 'p.barcode')
->leftJoin('p.productDepartment', 'pd')->addSelect('pd.stock')
->andWhere('pd.department = :departmentId')
->add('orderBy', $sOrder);

// Manage limit of record
if (!$isTotal) {
if (isset($offset)) {
$qb->setFirstResult($offset);
}

if (isset($limit)) {
$qb->setMaxResults($limit);
}
}

if ($searchStr != '') {

$qb->where('p.productNumber LIKE :search')
here is my code I am assiging all parameters in array format
 
2:00 PM
@KartikPatel use a pastebin
 
@Patrick sure :)
 
you're pushing the $tempParameters inside $parameters
so the arrays ends up with 2 elements
 
what is a "data-driven decision"?
like looking at analytics and changing code/website based on that?
@Jimbo are you still around?
 
@Arheisel : but as you can see $parameters = array('departmentId' => $departmentId); in first line departmentId parameter is used and in $searchStr if condition there are three where clause with same parameter, and after pushing array I will get two parameters with values and then set for all parameters with using setParameters, If I am commenting if($searchStr) code then it works fine for me
 
@Tiffany It depends. If this is related to your question two lines up, I'm not here, otherwise I am :)
 
2:10 PM
@Jimbo haha, related to the message you made about hiring. Curious if they pay to relocate >.>
@Jimbo actually, now that I think about it, I'm probably not eligible... I still need my passport. fuck.
nevermind
 
!!taaa daaa!! Finally I completed it @jimbo
:p
 
e v e n i n room
 
evening @Linus
 
@Tiffany Get a passport...? Also, they do and you don't pay anything to live for the first 3 months - you stay in the 'trivago flat', it's great ;)
 
@Linus \o
 
Anonymous
2:13 PM
@Jimbo ah man that sounds good
 
o/
 
@Jimbo :O Nice.
 
@Akshay You pretty much copied mine, and called yourself a lazy developer, lol
 
@Jimbo yeah, I need to get it. I need to get my birth certificate though from the grand state of Arkansas since I don't have my copy anymore. I only lived there like the first six months of my life.
 
HAHA I though a lot didn't get any clue then I used my mentor's ! :p]
 
2:14 PM
I suppose I should stop dicking around and get that started...
 
There were question to mention a mentor !
 
@KartikPatel Is there a chance that the where clause in $qb->where('p.productNumber LIKE :search') is failing because you already used where earlier in the code? perhaps an andWhere?
 
I mentioned great @Gordon! @Jimbo
:D :D
 
@JayIsTooCommon uh, sure but it won't be before the w/e at the earliest
 
@Arheisel yeah I have already checked same scenario, but bad luck :(
 
2:20 PM
morning @tiff
 
Anonymous
@DaveRandom I'll try and give it a roger on my own if I get the time, then cry a little etc... etc...
 
@rabbitguy morning
well, finally ordered my birth certificate. Once I get it, I can start the passport process.
 
@Tiffany I didn't eat yesterday and I didn't sleep much last night... :/
did you lose your birth cert?
 
Anonymous
@Tiffany Would you really want to leave umerica for Spain?
 
@rabbitguy :/ I went to bed late. I think I'm going thorugh a manic episode.
 
2:23 PM
I think I am starting to get manic too
 
@rabbitguy yeah, long time ago, and my dad isn't willing to let me use his copy, so eff it.
 
but they didn't refill my mood stabilizer until yesterday. I was almost without it for a week :(
 
@JayIsTooCommon Possibly, I mean, relocating for a job is reasonable. The only thing that would suck is my boyfriend is six hours away here. I move to Spain, he's several hours away...
@rabbitguy I've been without for over a month now. >.<
 
um... why?
by choice?
 
do you trim the user inputs?
 
2:25 PM
cause, the last time I was at the psychiatrist's office, I had hives from an unknown cause, and she didn't want to prescribe a new medication on top of it, since the last two bipolar medications I tried caused hives.
 
@Tiffany tried lamictal yet?
 
she wanted to wait until they went away before adding something new.
yup, I love it, but it gave me hives
trileptal too. Apparently I'm the only one that reacted to trileptal. I'm "sensitive" to medications
 
@Tiffany that sucks, bcz it's a great drug
 
it is. it worked so wonderfully for me.
 
they just put me on Gabapentin for anxiety, so that's two scripts for anxiety and one mood stabilizer
 
2:26 PM
I wish it were possible for me to try it again :(
 
@yessure Is "it depends" an answer? :P
 
for me, the more we can combat my anxiety the less risk I have of going manic or depressed
 
I'm still treating my ADHD... which makes me prone to manic episodes
cause stimulants
 
yah
 
@PeeHaa lol, I will be more specific, should I trim the user emails? it's boring
 
2:28 PM
@yessure Yes I trim those
 
I read that people who have ADHD and bipolar disorder, usually the bipolar disorder is treated first, because treating the ADHD first usually puts the person in a severe manic episode. Which I experienced last year. That was fun.
But the bipolar disorder wasn't apparent until this year, lol.
 
same...
I went very manic this past summer
 
I didn't know I had racing thoughts, or what racing thoughts were, until I explained what I was experiencing to my psychiatrist, and she knew immediately.
 
I am surprised I didn't lose my job over it tbh
again, same about the racing thoughts
I just thought everyone had that, tbh
 
yeah, me too
 
2:30 PM
or that I was "disorganized" in my thoughts
brb
 
that's how I felt about the symptoms of ADHD. I thought everyone had a voice in the back of their head that constantly talked nonstop
 
Anonymous
!!dad
 
Two satellites decided to get married The wedding wasn't much, but the reception was incredible
 
@JayIsTooCommon sorry :P
 
Anonymous
:D
 
2:33 PM
Finally getting the hang of reg ex
/.html/ will find any traces of html, and /^.html/ will find if the string begins with .html right?
and use \ to escape characters, what's the next advanced step I should learn?
 
@TheodoreEnderby .html means {any character}html
 
Because . isn't escaped?
 
Correct
 
Good to know!
 
@TheodoreEnderby Next easy thing would be character classes and after that capturing groups
 
2:36 PM
If you have some spare time and wanna walk me through it that would be awesome, otherwise I'll do some googling
 
holy fuck, I wanted to use symfony console but tried to integrate with auryn... wtf
 
I know about groups a little bit
 
Do some googling. If you get stuck I am willing to help
 
Thanks peeha
 
@SergeyTelshevsky Didn't @Danack do some stuff to make that easier?
 
2:37 PM
@Danack @Jimbo any workarounds on this
@PeeHaa yeah, I've seen his fork
 
Ah there is the guy :)
 
but fork's been updated 2y ago :(
maybe some new solution appeared
 
I don't think so. I only remember dan cursing
 
this is madness
 
He is old though and old folk always say things are bad nowadays
 
I love Symfony! Anyways thanks for letting me share my knowledge guys I'm out
 
the f they did it that way.
 
o/
 
@Tiffany yeah, anxiety meds work well for me to quite that voice so I can get stuff done
 
2:40 PM
@SergeyTelshevsky ¯\_(ツ)_/¯
 
the f they can't separate instantiation, routing
 
@user3799112 Have you tried glob() instead of globe()? :P
 
yeah I did
 
Evenings
 
2:42 PM
!!docs glob
 
morning @Ekin
 
[ glob() ] Find pathnames matching a pattern
 
@Ekin o/
What you can do @user3799112 is:
 
I m working on the solution provided by Purushotta wich uses glob
 
glob the directory and get the array. For the first div use array_shift to shift the first element off the array. And foreach through the rest of the array to fill the other thingas
!!docs array_shift
 
2:43 PM
[ array_shift() ] Shift an element off the beginning of array
 
ok, I'll have a look into that
 
If I understand you correctly that should work for you
 
ok, but any good alternative to symfony/console ?
 
it now works with the solution provided , it only does not 'include' the file but instead puts include(....) between the divs
 
I don't want to write that myself again(
 
2:50 PM
@SergeyTelshevsky No idea sorry
 
just had a look in array_shift, it only takes the first item. In the future I would like to be able to take the first two also.
 
Anonymous
@Tiffany bring him with :P
 
@JayIsTooCommon he's in college :( or I would
@JayIsTooCommon he's...quite a bit younger than me.
 
It's ok. @JayIsTooCommon is my toyboy too
 
Anonymous
2:55 PM
toyman*
 
:D
toybeast
 
Anonymous
that's better
 
usually it's boytoy
my boyfriend jokes that he's my college boytoy, lol
and I have to link him to this chat transcript, rofl
 
@SergeyTelshevsky the fork just works.....which is why I haven't updated it. I haven't seen a need to update it.
I use it at work and for personal projects.
 

« first day (2244 days earlier)      last day (2704 days later) »