« first day (2084 days earlier)      last day (2864 days later) » 

11:00 AM
@Maurice LIMIT does exactly that
 
@PeeHaa Specific reasons for that? I've used that for almost 2 years or something :P
 
Anonymous
LIMIT 30
 
It limits the recordset not the search space @ma
 
@samayo yupp, but have not idea how's things now. It looks like they get more mature in 5.x version, but not sure how mature poor design issues become.
 
user3119231
oh okay, there must be an error somewhere else. I thought if I do a LIMIT it even searches only in that matrix
 
11:01 AM
@C0dekid Because globals are bad. Mutable globals are terribad. Because it will become a maintenence, debugging, testing nightmare later
 
@PeeHaa but still, most people overuse real exceptions.
 
Oh, thanks! Will fix that later :p
First I need to figure out how I should do that variable scope thing
 
@C0dekid you may want to give this a read. It's about something different, but it solves the same problems
 
Thanks ^^.
But it's strange, if I put global $test in home.php it works :P
fixed now :P
 
That's not strange at all. Because you import the variables from the global namespace into the current namespace
That's kinda what global does :-)
 
11:04 AM
Not sure if i'm doing it right, but I have now this:

function LoadSite()
{

$http_codes = new http_codes;
$test = "x";
 
Anonymous
@pinepain I still have not idea, I think it's not as bad as some symfony fans make is seem. But I would trust symfony more, as it is way more mature.
 
Anonymous
@C0dekid I don't want to discourage you, but you probably need to rethink about your framework and start from scratch, if you are planing to run it on production.
 
@C0dekid Yes that would be one way to get started
 
@samayo Reason? :P
 
@samayo I currently have apps in Laravel 4.2 and in Laravel 5.1. =) If you mastered it and read sources, it can do the job for you. So not so bad. Though, I would love to get rid of Eloquent AR in a favor of Doctrine (and then slowly replace other components ;) )
 
Anonymous
11:09 AM
@pinepain Why didn't you go for Symfony?
 
I came on existent project with some legacy part
 
Anonymous
@C0dekid Many. You can check small frameworks like Slim, and how they handle dependency, autoloading, naming conventions ..
 
i guess it is some cult to wrap legacy into laravel
 
Hi
 
and it partially explain why Legacy and Laravel starts from the same letter
 
11:11 AM
That is advanced builded, I want to keep it simple
They also used namespaced which I don't need to use :p
 
Anonymous
:) Yeah, I think it's great for a quickly building prototypes, I wish symfony had the same learning curve
 
But maybe it's the route thing that should be different from what i've now
 
moin
 
we'll move at some point away from it and code we design now written as much laravel-independent as it can be, so maybe in a year we'll switch to zend or symfony
o/
 
:P
This from slim '$app->get('/hello/{name}', function (Request $request, Response $response) {' looks really cool, maybe I should do the same since i've just started
 
11:14 AM
Maybe you should start by building applications instead of frameworks?
 
It's for personal use only, but thanks
 
srsly
For one thing you can't know what you need until you've been in a situation to need it
 
Is there a way to map a namespace to a certain class? For example, I have a namespace \Foo, all the classes extends class Bar, however, class Bar is complete enough to be instanced alone but it relies on the subclass name. Now the autoloader tries to load \Foo\Test, however, that class doesn't exist, is there a way to create \Foo\Test that extends \Bar automatically? The only way I found is using eval and I'd like to avoid it if possible.
 
@Manulaiko You cannot execute dynamically generated code without dynamically executing it, no
However, it sounds like a horrible thing to do anyway, what's the use case?
 
@Manulaikon have a look at class_alias() php.net/manual/en/function.class-alias.php
not exactly extend, but maybe you will find it useful for your needs
 
11:26 AM
yeah, thank you!
 
seriously though, examine why you are doing this and whether you actually need to do it
 
I don't want to have a full namespace with empty class that only extends Bar
 
There are use cases for this sort of thing, but there are for more uses than actual good solid use cases
@Manulaiko the question is why you are attempting to instantiate a non-existent class in the first place
 
Bar Is enough complete to work by itself, but it relies on the name of the child class
 
!!rfcs
 
@Manulaiko Dave has a valid point, in most cases you don't need that, can you clarify more what's the use case?
 
I have this framework that I'm building: github.com/manulaiko/alexya The class \Alexya\Database\ORM\Model has enough components to be able to work by itself, however, it relies on the child class name to retrieve the table name
As most of the times there's nothing to configure on the child class the result is an empty class that extends \Alexya\Database\ORM\Model
 
Frameworks are like assholes. Everyone has one. And they all stink
- PeeHaa
 
github.com/BlackEyePS/cms is build on top of my framework and in the package \Application\ORM you can see that 90% of the classes are empty because there's no need to configure anything
 
Anonymous
Everyone has their own abandoned frameworks.
 
11:38 AM
That too
Hell I have several :P
 
Wes
i'm so proud that despite they are utter shit, i keep using my abandoned frameworks :B
 
Is it possible I have to use the new self() method?
$cs = new self($this->version);
 
Wes
you should avoid static stuff
what are you doing <ins>with new self()</ins>, though?
 
Making myself a cms/framwork thing
 
3 mins ago, by samayo
Everyone has their own abandoned frameworks.
 
11:41 AM
Because I'm bored
 
If the class is extended and you want to instance a child class from parent use static, if not use self
 
probably do not do that
 
Why?
-2
Q: Can i call own class in php?

user5510975I don't want to use new in my calling php document. I just want to call static method. For example my class is: class MergeCaching{ public static function writeList(){ $write = new MergeCaching(); // I want to use new here $write->getListFromRu(); } public functi...

 
them codekids nowadays…
 
OK so... self is a of questionable usefulness, because it refers always to the class in which it is used, so you can just use the name of the class instead (which you obviously will always know). However it can make things more readable/clear that it's not just some arbitrary static access and huge encapsulation violation.
Late static binding on the other hand, is basically a sign that you are doing something wrong, either because you are doing some kind of horrible static inheritance thing or violating encapsulation.
Given that LSP does not apply to constructors and that interfaces should not define constructors, new static has absolutely zero guarantee of doing something even remotely sensible, and will quite possibly just fatal
 
11:47 AM
So it's better to avoid that?
Or better to use
 
If you have a static factory method, use new self. Or just don't have a static factory method.
 
ok
 
All these things do have use cases, but they have a lot more abuse cases
 
:D
Doesn't matter for me, it it work it works
 
Wes
you sound like me after i tried to fix my washing machine by kicking it
 
11:51 AM
And.. it worked after you kicked it? haha
 
Wes
it did at first. but eventually it exploded in a fireball
 
O_o
 
@C0dekid ...until it doesn't
 
Wes
@C0dekid i was exaggerating. but yeah, eventually it broke down
 
@DaveRandom Then I force it anyways :D:D.. but note I'm still learning any suggests are welcome..
I really need to do something else for that include soup for URL params :S
 
11:55 AM
Cometh the hour, run awayeth the man. #BorisJohnson
 
@DaveRandom technically self is useful inside a trait......however.....that is probably a bad argument.
 
but I can't figure out what
 
@DaveRandom What is happening to our country
 
Apparently the first good thing for several days
 
Wes
@C0dekid consider this. there are a million ways to do programming wrong and they are mostly subtle. if you don't follow at least the known, solid, well established good practices you'll be writing just crap. not wanting to be harsh, just giving you an advice
 
11:59 AM
Are there any non-laravel/slim/etc.. based tutorials for frameworks?
 
jeez, the quality on the main site in the php tag is such much down the drain
 
hello php buddies... One problem i have...
 
Wes
hello yoda buddy
 
Thanks @Wes
 
12:01 PM
gist.github.com/anonymous/fedb0ea688d0854ad5b138cf1b41a20b i am sending one jsonobject but not received correctly at server side
 
Anonymous
@C0dekid this article helped me when I asked myself that same question.
 
But that requires simfony?
nvm ;p
 
@RavindraPawar how are you sending the JSON? It's more of a JavaScript fault than PHP's
 
@Manulaiko i am sending from android application, using retrofit
 
Anonymous
@C0dekid Just read it, you'll thank me later.
 
12:03 PM
Jmmm 'the summer holidays' is that a real used term in English?
 
8
Q: How can I delete the nameValuePairs key from the JSONObject?

13KZI'm working on an Android project which needs a JSONObject for the body of my POST request. After putting the keys and values of the JSON I got the following line: { "xxxx":"zzzzzzz", "yyyy":"uuuuuuu" } But the server got the following: { "name_value_pairs": { ...

 
@DaveRandom any another option??
 
I have no idea, I just know that your problem is not a PHP problem
That looks like the exact problem you describe, and the solution seems to be quite simple
 
@DaveRandom thanks der..
 
I added this method to the autoloader to map a namespace to a certain class: pastebin.com/mbhXvEc1
is it enough?
 
12:17 PM
@Manulaiko thanks
 
I just threw away 5000+ pages of outdated IT Literature
 
\o/
 
The PHP 7.0 manual?
 
I only kept Restful Web Services. IA for the WWW and a german one about building web navigations. all o'reilly. anyone wants them?
they were not dated enough to throw them away
 
WTF @Gordon
 
12:25 PM
lol
.. And I tought I was bad in PHp
:S
 
:P
 
@C0dekid , you still are
 
Thanks but I didn't ask for that feedback :p
 
sigh
[exec] [admin@10.138.25.72:22] out: Warning: {...} , "Zend_Cache_Backend_BlackHole" was found
sometimes I hate composer for bundling sh*t :p
 
12:29 PM
So, @DaveRandom
you're a foreigner now :D
 
@AlmaDo Bloody Foreigner, coming over here, demanding to know what love is
 
user image
4
:p
 
LOL
 
Sorry, this content isn't available right now :'(
May be beacause now I need to pay taxes to view it :D
 
@DaveRandom yup, private link
probably only shared with friends
 
umm, how is the error shown related to the code shown? does curl fread under the hood? stackoverflow.com/questions/38123120/…
 
@Gordon I think those are unrelated, yes.
 
@Oldskool well that's bullshit, frankly. I hate facebook, do not understand it, and am now closing it again for another 5 years
 
@DaveRandom I didn't use it for good 20 years ;)
 
Keynote speaker #5: The software craftsman @unclebobmartin Come see the legend. Register now: http://www.zendcon.com/register-now #ZendCon2016
nice
 
:P
lol Play Store added a new tab Beta
 
this column shows what thing?
 
Characters I think
 
1:05 PM
yep
or bytes
 
@Shafizadeh Looks like string length, but in that case the texts are trimmed
 
@Fabor I hardly think so, because sha1 has the same character as sha256, but they haven't an identical value into that column
 
@Shafizadeh numbers
 
@PeeHaa numbers of what?
 
Figure it out
 
1:06 PM
it's hashed
 
@Oldskool I don't think it's related to the string length.
 
@Shafizadeh length of the hash (in hex) in bytes
 
@Leigh Ah .. that's correct. thx
@C0dekid tnx
 
It's a completely pointless number, don't rely on it for anything :)
 
@Leigh I think it's important for the space of the RAM ..
 
1:10 PM
Also ask yourself, do you need a cryptographic hash, or will a non-cryptographic hash with high collision resistance work just as well
 
@AlmaDo ...a very good 20 years
 
May please someone tell me what's the meaning of this joke? "I once accidentally said hi to a feminist. My trial begins tomorrow"
 
Wes
@Shafizadeh always use md5 #shittyprogrammingadvices
what are you doing?
 
@Gordon wow, at a PHP conference??
 
1:19 PM
@Wes people said to me, mdf() isn't much secure
 
Aren't all ebooks free?
 
@DaveRandom yeah, I was surprised about that as well.
 
Wes
@Shafizadeh indeed. was a shitty advice :P
 
@DaveRandom gotta teach the worst
 
@Wes :-)
 
Wes
1:21 PM
!!should i cook fusilli or spaghetti
 
You should spaghetti.
 
@Wes that totally depends on the sauce. you should know that!
 
@Gordon I seem to be all out of sanity. Can you spot me a bit?
 
Wes
@Gordon fresh tomato, tuna, basil. both are good
 
Wes
1:25 PM
i wrote that site.
 
@Machavity I think you can get around reading all of these books by only reading the one about outsourcing
 
@Shafizadeh In western culture some feminists take almost anything to an extreme, either asserting it's insulting or sexual harassment. The joke asserts that the simple act of greeting someone could be interpreted as sexual harassment
 
@Machavity oh .. thank you :-)
 
@Wes then you should know there is no such thing as a tuna tomato basil sauce ;)
 
Wes
what are you talking about willis, we have cooked that for centuries :P
 
1:29 PM
@Wes not according to the academia
 
Wes
slightly fry some tuna, add it to tomato sauce, add black pepper, salt, add basil. looks like this cucinandosimpara.files.wordpress.com/2012/01/… and it's delicious
 
that must be some foreigner sauce then… probably sicilian.
 
Wes
nah. i was born in the south and i live in the north. they both cook this thing
 
you can tell I am kidding, can you?
 
Wes
i'm always very serious about these things :P
 
1:32 PM
Spaghetti with a side of troll :P
 
@Machavity Spaghetti Trollognese
3
 
@PeeHaa Wow, such stupid.
 
Hmm, Trollognese. I guess that's vegan dish then. With godknowswhat for ground beef.
 
Inorite. They sure made some bad decisions when designing that one
 
Gon
Evenin'
 
1:40 PM
evenin roomies
 
It's afternoon here
;p
 
@Wes No where near enough food in that picture.
What is this? A meal for ants.
 
Wes
are you american?
:P
 
Seriously that was like 2 forks full
 
^ another foreigner haha
 
1:47 PM
@Fabor has already shown me what love is
6
 
@Wes Me? No, from The Netherlands. xD
 
Was I awake for this Chris? :-/
mmm this looks good.
 
:o
 
@Fabor it does
 
Anonymous
Eh can't english. "Field applied_for is the * that the applicant has applied for" * Has to be generic? So not course, vacancy etc... Any ideas?
 
Wes
1:51 PM
@Fabor it's because if you eat more than that you get as fat as @PeeHaa's mom
in fact his mama's so fat she can only take selfies with the hubble space telescope
:P
 
Anonymous
I think @PeeHaa's mum has a great figure..
 
lol!
 
Wes
@DaveRandom that sounded ambiguous
 
@JayIsTooCommon "prospect"?
Also, "...for which the applicant has applied"
god damn it I saw that joke like 3 fucking days ago and I cannot get that fucking song out of my head
it is driving me actually insane
 
@Wes I exercise so I can eat more. Not excessively, but more than that -_-
 
Anonymous
1:57 PM
@DaveRandom <3 Thank you
 
position? :/
 
we should not use die() do we have to use exit instead of die()??
 
Wes
you won't eat more than that in fine italian restaurants. not joking. but not only here, have you seen how microscopic are the plates in programs like gordon ramsay's or jaime oliver's? literally one fork of spaghetti. that's the standard :P
 
@AnmolRaghuvanshiVersion2.0 who says you shouldn't use die?
 
"equal to" or "equal with" ? context:
- one male's testimony is equal with two female's testimony.
- one male's testimony is equal to two female's testimony.
 
Anonymous
2:01 PM
@Fabor Was my first thought, but then students may be applying for courses so wouldn't make sense :( Prospect will do!
 
Wes
manual says: normally use exit(); use die() only when something catastrophically tragic happened
 
Tea-Maker then
 
Anonymous
@Fabor @Wes + he's 8.75ft tall...
 
Anonymous
That'll do !
 
@AnmolRaghuvanshiVersion2.0 You should not use or die(), but die() itself is fine if that's what you actually want to do. However, you basically never want to do this unless you are writing a console script or, occasionally, in a web app bootstrap
 
2:02 PM
Sep 5 '15 at 14:11, by PeeHaa
No and die is the perfect way to make your API unusable
 
why would you need exit/die in a web-based app ?
 
@Wes Pffrt, no fine dining in Italy for me then. I'm going to find Italians I know and eat at their grandmothers house.
 
@Sjon that what i want to know is bad pratice to use die or exit in web app?
 
@Sjon guard pattern in an app that requires HTTP auth. off the top of my head I can't think of any other place but there are probably a couple.
 
@DaveRandom yeah, header(location)+die sometimes makes sense
 
2:05 PM
people use die in database connection usually..
 
Wes
@Fabor i said "fine" restaurants. if you eat in a "Trattoria" in Rome you'll be covered with pasta :P
 
Rome? No thanks. I like keeping my wallet.
 
@AnmolRaghuvanshiVersion2.0 probably not PDO, like you should use for dbs
 
@AnmolRaghuvanshiVersion2.0 ...and then users get a blank white screen with no explanation as to what happened
 
@AnmolRaghuvanshiVersion2.0 then at least throw an Exception instead
 
Wes
2:06 PM
@Fabor because it's expensive or because you think you'll be robbed?
 
Latter
 
The point is, @AnmolRaghuvanshiVersion2.0, when you call die/exit, nothing else can be executed. No error handling, no clean-up, nothing. This is very rarely what you want.
 
Wes
hm. i think you confused rome with naples. rome is pretty secure everywhere
 
@Sjon ,@DaveRandom thanks that i want to know :)
 
Voer voor je hoedenplank, hoedenplak, tast toe voel die woofer
 
2:08 PM
I got a friend in Chieti. Well he lives here now, if he ever heads back I'd probably visit him.
Bari too.
 
@C0dekid hoedenplank sounds very painful
 
Those two are suuuuper Italian heh.
 
@Gordon Haha, was listening to some radio, when suddently this song came up ;p
You're dutch too?
 
Aaaah
 
@C0dekid Everyone here is Dutch
 
2:11 PM
I can taste the frydaI beccas
 
why are we even speaking English?
 
@Sjon lel
Don't know
 
Wes
@Fabor for instance it's way easier to get robbed in Bari, than Rome :P chieti is ok though, small-ish city
 
kelunik@s18149550:~$ sudo rm -rf /
rm: it is dangerous to operate recursively on '/'
rm: use --no-preserve-root to override this failsafe
kelunik@s18149550:~$ sudo rm -rf /*
rm: cannot remove '/dev/pts/1': Operation not permitted
rm: cannot remove '/dev/pts/0': Operation not permitted
rm: cannot remove '/dev/pts/4': Operation not permitted
rm: cannot remove '/dev/pts/2': Operation not permitted
rm: cannot remove '/dev/pts/ptmx': Operation not permitted
I think it's fine. :-D
 
@Sjon We are?
 
2:12 PM
@Machavity yes, didn't you know?
 
huh wtf? xD
 
I'd have an Italian escort though. I only know "thank you" and "crazy" in Italian :P
 
Ok, @PeeHaa, need something new for kelunik.com, any ideas?
 
Every time they get frustrated and start mouthing off to themselves in Italian during a game I start reeling off as many Italian ingredient/food names as I can to join them.
 
Wes
ahahaha
 
2:13 PM
@Sjon I mostly see people from indian that making a online hotel booking site or something..
 
Or general dominos pizza names.
 
Wes
many italian dishes also work as swearing, so you probably didn't do too bad. pizza for instance also means boring, surprisingly. mozzarella means being weak
 
@Machavity lol yeah
@Wes huh... didn't know that.
 
Wes
pizza also means gentlemen's private area :P
 
2:18 PM
hahaha
I don't like pizza
 
Anonymous
Apr 10 at 11:22, by Wes
i ate sushi on pizza once. it was surprisingly good :B
 
Anonymous
^.^
 
Wes
needs context @JayIsTooCommon doesn't work that way :P
 
> Andi Gutmans, co-creator of PHP and co-founder of Zend, shares his views of the software world in his new role with AWS.
When did he start working for Amazon?
 
Anonymous
2:29 PM
@Wes :D
 
Can anyone recommend anything for running integration tests for APIs? We've been using Postman but it's shite - trying to store the tests in git rather than having them stored in a paid Postman account is just terrible.
 
@kelunik WHat are you looking for? A site or some service?
 
@kelunik you can mirror RaaS
@Machavity recently… one or two months ago I think
 
@Danack I'm not sure I understand your question
 
@Danack phpunit?
Let's all take a quick moment and appreciate the fact that we're not UI developers. (If you are: tough luck for you)
 
2:53 PM
@PeeHaa Some small service.
@Gordon RaaS?
 
Also: thinking...
 
LOL @PeeHaa
 
@kelunik what PeeHaa said
 
@Danack could use Mink/Behat for that, like it is described here: knpuniversity.com/screencast/rest/testing
Just commit the step definitions and the feature files and you're good to go.
 
@Ocramius I wonder what was the reason not to use autoloader in doctrine/annotations (and use AnnotationRegistry with its own class loader instead)
 

« first day (2084 days earlier)      last day (2864 days later) »