« first day (1777 days earlier)      last day (3162 days later) » 

12:00 AM
over what limit?
 
I will include the full code, it shouldn't get any data if distance is set to specific limit
 
/me sighs
I'm out, later
 
Alright lol
here is the full code pastebin.com/3j3Qd3rJ
 
@ircmaxell I actually feel like we totally need a SSA->CFG transformation and major compiler rewrite for that first before we can get anything like that done. And I'm not having too much time to do that now. [I have real respect for Nikita how he managed the AST alone for PHP 7] … But maybe in like a month after the exams… [if not too busy with Amp/Aerys things then.]
At least I always wanted to do these things once…
 
12:17 AM
@NSGod you really should learn how to use prepared statements
also. it's time to sleep
 
Also, how to use google.
 
@tereško It is a prepare statement and Goodnight
 
good morning all
 
prepared statements do not have mysqli_real_escape_string()
or string concatenation
 
Anonymous
12:24 AM
@NSGod You're entering a world of pain.
 
@samaYo why?
 
12:44 AM
can trait methods override class methods?
 
@LeviMorrison @DaveRandom we forgot yesterday, but this one is also possible now 3v4l.org/ukuBg
 
Anonymous
@bsapaka No imo
 
Anonymous
@NSGod because it's atrocious
 
@bwoebi oh most definitely
@bwoebi CFG opens up a TON of doors
 
1:01 AM
@samaYo You mean the way I did the query? :/
I have another Statement without mysqli_real_escape_string(), but same result
 
1:18 AM
@marcio You mean for recursive closures?
 
@LeviMorrison yes, which is very ironic.
 
1:30 AM
I think (__CLOSURE__)() should work.
 
1:41 AM
yeah, (__CLOSURE__)() is such a lazy deadbeat
 
@LeviMorrison by design you wouldn't be able to (__CLOSURE__)->bind(), not sure if it would make sense though
 
@marcio Why not?
 
Morning
 
Morning, Hendry.
 
@LeviMorrison it seems weird to have an object stored on a magic constant
 
1:56 AM
I need to run
while(true)
script on cron job, is that any suggest?
 
for some reason the distance in my query not working pastebin.com/NxxvWd34
 
@marcio By the way, I'm not sure why anonymous functions would need recursion. I feel like if they need to recurse they should be named.
shrug
Also, __SUB__ works for recursion in Perl.
 
@LeviMorrison that's what most languages did, except javascript
> ECMAScript 3 resolved these issues by allowing named function expressions.
 
2:14 AM
morning all
 
@marcio That could be a way of resolving the issue. Allow closures to be named.
 
2:35 AM
@marcio What features of PHP would you throw out if you could start from scratch?
 
good morning
 
morning o/
 
@LeviMorrison tons
 
@ircmaxell Obviously :D
I was looking for specifics.
I've loudly heralded some of mine. Goodbye, references.
Farewell array semantic that act like absolutely nothing else in the language.
RIP late static binding.
Variable variables… may you never be seen again.
 
split symbol tables
 
2:45 AM
Yep.
Case insensitivity.
@ircmaxell And along with it the magic methods replicated in both the static and non-static worlds.
 
@LeviMorrison that one I actually like
 
With unified tables I'd prefer one overload: symbol access.
No separate method/property/constant magic.
 
yes
then again
having a method and a property named the same thing can be handy
 
@Sajad I see the point I was trying to make here was lost ... this is probably what you should have taken away from that conversation
@ircmaxell so what does Grovo do exactly are they a LMS vendor or is it more of a continuing education platform?
 
3:23 AM
morning
 
@LeviMorrison I don't think references are bad
Well, they are bad
But I don't think the concept itself is necessarily bad
 
@NullPoiиteя o/
 
 
2 hours later…
5:15 AM
Friday!!
 
rebica black friday ;p
 
@NullPoiиteя :(
;p
 
@bwoebi Probably.
 
anyone know how to replace the content of the div using php?
 
@Trowski fixed in seven ...
 
@winresh24 what you want to do ? php dom parser ?
 
yep i parse some content and iwant to change it
 
ok now what have you tried ? :D
 
6:01 AM
str_replace("Vragen? Wij zijn vandaag bereikbaar tot 22.00 uur • Telefoonnummer:0342 - 411 350 •", $business-hrs);
this one @NullPoiиteя
 
Morning
 
@Trowski I'm not being difficult, some of these problems are insoluble in five, or the only solutions are horrible ... one of the main problems is needing to read from the object store of other contexts, this is dangerous, not supposed to be done at all, and when you do it the results are undefined, sometimes they go our way and others they don't, in 7 the problem has gone because a zend_object* is directly in the zval, so we can safely do things we just couldn't do before ...
moin all
 
6:19 AM
Well played @NullPoiиteя
 
str_replace("/Reviews/SubmitNewsletter", "https://www.sample.com/Reviews/SubmitNewsletter");
whats wrong with this @NullPoiиteя
 
@winresh24 You're missing a parameter - you need 3: search, replace, subject
 
what was the subject? @AllenJB
 
The string you want to perform the replacement on
 
6:29 AM
should i repeat this one /Reviews/SubmitNewsletter?
 
github down again ...
 
@JoeWatkins not for me
 
@winresh24 I would suggest looking at the examples in the PHP manual - that should show you what to pass for each parameter
 
@kelunik I mean git@github, can't push, keeps dropping out ...
oh thereya go
I said it was fixed before I fixed it ... easy for 7 ... use 7 ... 5 sucks ...
 
@AllenJB thanks i just used js :)
 
Hrm, am I remembering wrong, or is there a php command where the print_r(); is automatically wrapped in the <pre></pre> tags?
 
@Epodax I usually use echo, but if there was such a function, that'd be great.
 
Abe
css is becoming an actual programming language lol
in HTML / CSS / Web Development, 20 mins ago, by Stephan Muller
lol someone made the first level of the original Wolfenstein in pure CSS and it's actually kind of playable..ish html5gameengine.com/games/…
3
 
@HassanAlthaf So do I, but I just seem to remember reading a question where he/she used a command to do a print_r that was automatically wrapped in the <pre> tags, although I might be wrong.
 
Abe
works best in chrome
 
6:43 AM
@Epodax Found it.
 
@Abe Oh for duck sake...
... I am way too gullible today
clicking every god damn link sent -.-
 
Abe
:D
 
@Abe lol
 
Abe
3 messages moved to Sandbox
6
 
@Abe :D
 
Abe
6:52 AM
??? why?
 
stackoverflow.com/q/32264285/2310597 any help would be appreciated
 
@HassanAlthaf wtf is that ?
 
@Richerdfuld Magic.
 
For css programming language
 
6:53 AM
@AnmolRaghuvanshi lol
 
@Abe You should be ashamed of yourself.
 
Abe
ahahahah
 
Or perhaps I should be ashamed of myself...
 
Just out of curiosity, how are you making the arrow at the very start?
 
Abe
6:55 AM
copy paste
 
ah
 
@Epodax alt gr + i for me. ;-)
 
You move messages, that line comes up.
 
@HassanAlthaf I have no idea how to move anything, I am still struggling to learn how to do chat commands and etc
 
6:56 AM
@Epodax Magic.
Gimme 100 rep, Ill teach u how
 
@kelunik So, nothing happens when I hold down alt gr and press i ;/
@HassanAlthaf How 'bout I slap you with a fish instead?
 
@Epodax Linux and depends probably on your keyboard layout ;-)
 
@Epodax Which fish? Shark? Sardine?
 
@kelunik I'm Windows :o
 
6:58 AM
Ewww Windows @Epodax
 
@HassanAlthaf Squid, a live one, that way it'll be stuck to your face... and I know I know, it's not technically a "fish"
 
@Epodax On windows you probably have to use alt + numblock code.
 
i am still using Windows Xp
 
@kelunik properly, but no reason to find out which it is, I will have forgotten it in less than a minute.
I'm bad at remembering numbers.
 
7:01 AM
@HassanAlthaf MOre like this i.dailymail.co.uk/i/pix/2015/02/25/…
 
@Epodax Oh no, my face will look horrible.
 
@HassanAlthaf Must.... resist.... spicy... comment...
 
?
I listen to Friday - Rebecca Black all day.
lol
on Fridays.
 
It would've been easy to come with a snarly comment about your appearance from your reply :P
 
7:03 AM
@Epodax I'm always wondering if there are really people using it regularly.
 
Sorry, that didn't make sense to me.
 
@kelunik I'm certain there is.
 
posted on August 28, 2015 by kbironneau

/* by JoLabrycol */

 
@Epodax Oh ok.
 
@HassanAlthaf It was me trying to be funny, but I remembered that not everyone might. find it funny, especially you, and I don't want to offend you :)
 
7:06 AM
But I don't look horrible though. My instagram profile
Oh ok.
 
Abe
 
Oh ok. @Epodax I get it, if you offend me, I could report you for child abuse. jk
@Abe Damn, thats some old shit I saw on the PHP group in Facebook.
 
Abe
old but gold
 
old is told and therefore the excitement it gives isn't gold.
Don't you even know?
 
Abe
old is always better
 
7:10 AM
stackoverflow.com/questions/32264285/… amazon s3 sucks really hard that it hardly get any view :(
 
@Richerdfuld Damn, I felt sorry for you before.
 
sorry that I am using it
 
?? I am using amazon S3 aswell
 
'SSECustomerAlgorithm' => 'md5',
'SSECustomerKey' => $SSECustomerKey,
'SSECustomerKeyMD5' => $SSECustomerKeyMD5,
@Epodax than how do you assign ^
 
Hehe
'md5'
 
7:18 AM
i am just checking
i know i can have better hash
 
There's always better hash to be had, that's how you end up with an addiction
 
true, that's not a problem now though
 
Uh, not sure I'm using it the same way as you, but give me a second to check
 
Morning guys
I have a question related to ajax function calling
function fetch_part_purchase_id(){
	global $connection;
	$query = "SELECT `id` FROM `options_pos` . `purchases_parts` ORDER BY `id` DESC LIMIT 1";
	$result = mysqli_query($connection, $query) or trigger_error(mysqli_error($connection));
	$id = mysqli_fetch_row($result);
	echo ($id[0] == null) ? 1 : $id[0]+1;
}
 
go ahead ask it
 
7:20 AM
This is my function 1
This is function 2
 
why not use pastbean ?
 
ok
Check this code please
I have couple of questions here
Question 1) On line no 10, the value $purchase_id gets assigned
 
@Richerdfuld Yea, I'm not using it the same way as you, I'm using Ama S3 as download place.
 
But if I put use that variable in the query that is line 29, then it's value never gets printed in that query
Why is that so ?
 
@ZahidSaeed a function needs to RETURN something and not echo
so basically you are not setting anything.. so replace echo with return and you should be fine
 
7:25 AM
@Naruto If I return something then do I need to echo it ?
 
@Epodax thanks, do you know how to give every client some key and use that key to get files ?
 
no
 
ok got it
 
return means you are passing a value from another function back to where you called the function
echo means you are trying to print something on screen
morning everyone ^^
 
@Naruto Question 2) As you can see I'm also running an update query on line no 31
 
7:26 AM
"I love my six pack so much, I cover it with a layer of fat!" -- 9GAG.
 
Is this the way to run multiple queries ?
@Naruto Or is there any better way to do it ?
 
@Naruto Morning, are you still trapped inside susanoo? :P
 
@HassanAlthaf don't spam
 
@Epodax 'trapped'
 
@Richerdfuld Don't annoy.
 
7:27 AM
@ZahidSaeed please use prepared statements, and you are only running 1 query?
 
Protected then.
 
just playing hide and seek m8 ^^
 
Not hiding very well, it's quiet obvious where you are :P
 
@Naruto No i'm running 2 queries on different tables
 
yes, but you both query them, so I don't see a problem?
 
7:29 AM
@Richerdfuld Nope, I'm afraid I'm not that well versed in how to use amazon S3.
 
@Naruto I mean is this OK ?
 
@ZahidSaeed why not?
 
Is it the correct way to do it ?
@Naruto Got it
Are prepared statements also available in procedural programming ?
 
@Epodax well to be really honest, I don't wanne hangin a tree like a dummy.. so that's why I'm in there ;)
 
or is it only available in PDO ?
 
7:30 AM
you can use mysqli prepared statements 2
ignore that, bad example :P
 
@Naruto Whaaaat, why not? you can like, swing back and forth?
 
How can prepared statements secure us from SQL injection ?
 
@Epodax I don't wanne use my massive Rasenshuriken to reck them all to fast :P
 
@Naruto Sissy :P - You need to wreck them all!
 
but but.. It would end the manga too fast :(
 
7:34 AM
@Naruto What? the manga ended long ago?
 
you should read up on prepared statements and what they actually do for you
Well the animated manga then :D
 
:P
 
tbh, I hope there won't be an episode for each of the main characters that are trapped now >< that would be another series of insane amount of fillers :P
 
how to create AES256 hash with php?
 
@Richerdfuld tbh, no idea, but I did find this: gist.github.com/RiANOl/1077723
 
7:37 AM
@Naruto From the looks of it, there will be :/ But I hope it might just be 1 episode. covering them all.
 
@Epodax we both knw that is most likely not going to happen :P
dammit, I need to get some work done on this friday :P
 
thanks :)
 
@Naruto yeah :P
 
7:53 AM
Can I ask a good password encryption that is safe, and that is easy to decrypt JUST FOR ME?
 
I wish
There was a bot in the PHP room
 
Abe
@internals how slow is doing:
eval("class $rand extends B{ function x(){ /*...*/ } }");
return $rand;
do i have other options?
 
@LiamHardy write your own algorithm?
 
@Abe What's your goal?
 
@LiamHardy if it's easy for you to decrypt it's probably not a good password encryption and is not safe. Also you should not be encrypting passwords, but rather hashing them so the passwords can't be recovered, but needs to be reset.
 
Abe
7:59 AM
@kelunik override a method dynamically, and get the class name returned back. so no new class()
 
@Abe How about passing a callable instead? You could even bind that callable to the class that executes it then.
 
I always upvote cat
 
@salathe That cat looks horrified when the balloon pops
 
to bad you can't do something like: $data[$counter]["price"] = getProductPrijs()["price”];
 
8:07 AM
@Naruto You can do that.
 
@kelunik gives me an error tough :p
 
@Naruto what version of PHP are you using?
 
5.3.10
 
*facepalm*
 
well not like it's MY choice :D
 
8:09 AM
@Naruto You're still on 5.3... 3v4l.org/cj2r7
 
@kelunik the company is...
 
...shit, yes, there I said it.
 
@Naruto Slap your boss and tell him, "You outdated cunt, get PHP 5.6"
 
I guess the main problem is, if we upgrade, we are probably going to have to fix alot of outdated code 2, and I guess he is keeping the boat off...
 
@HassanAlthaf "But it's still maintained by the Ubuntu guys..."
 
8:11 AM
@HassanAlthaf And then either spend alot of time updating existing shit or watch everything crash and burn
 
@Epodax that is exactly what my bosses are afraid for I guess :D
 
Going from 5.3 to 5.6 will with most certainty break something
 
Tell yo boss to pay you bonus and u fix the shit for him. @Naruto
 
When I try to instantiate the Curl class
$this->curl = new \Curl();
 
8:12 AM
hahaha.. You know bosses are cheap asses when it comes to paying money :D
 
I get Class 'Curl' not found...
 
And without knowledge / being a programmer, it's easier to see the logic behind "If it ain't broken, don't fix it"
 
I've installed all the needed dependencies with the composer
 
$namespace = $this->getNamespace();
return new $namespace($arg);
Is there a way to do this all on one line or do I need to make the $namespace var? I tried curly braces but that is a parse error.
 
@crypticツ return new ($this->getNamespace())($arg) may work in PHP 7.
But just use the longer version...
 
8:19 AM
@kelunik wuts dat
 
Twitter is clearly broken, I'm getting suggestions for people to follow..
 
Abe
tl;dr no you can't
 
@crypticツ return (new ReflectionClass($this->getNamespace()))->newInstanceArgs([$arg]));
oh, and technically $namespace = $this->getNamespace(); return new $namespace($arg);is on one line ;)
 
technically correct - the best kind of correct
 
Thanks!! That works! Didn't even know about this ReflectionClass before.
 
8:25 AM
yw
 
@crypticツ No need to use the reflection class. The following should work:
return new $this->namespace($arg);
 
@Gordon technically, most people mean "one statement" when they mean "one line"
 
@FlorianMargaine I know, it was tongue in cheek
 
this discussion reminds me of this xkcd:
the alt text being the best :D
 
@tpunt won't work
 
Abe
8:36 AM
@kelunik trying with anon functions, but i feel dirty
 
@Gordon Yep, my bad. It seems 'new' doesn't like a method invocation as an arg. The following works though:
$class = $this->namespace();
return new $class($arg);
 
@tpunt yes, that's what she has and wants to do in one line ;)
 
@Abe That makes you feel dirty? You wanted to use evil before to create dynamic classes...
You should probably have a look at the visitor pattern.
 
Abe
:P
 
@Gordon D'oh. It's still early morning for me :)
 
8:39 AM
np :)
 
Hello, I am trying to remove some info of a url. I would like to match '://' with regex only if http or https are not present. I am using this regex '/(?(?=http)[^-\.\:\/\w]|[^-\w.])/'. Can you help with this?
 
@GiwrgosGkogkas why not strpos? or let's start from the beginning. what input do you got and what are you trying to achieve with it?
 
mornin'
 
@Gordon I have a big set of rules witch I combined as regular expressions. I am trying to validate a url like this 'http://www.george.gr'.
@go
 
8:51 AM
gonna download "Pretender" series
 
@Orangepill yes, I thought I did not understand your point ...! but now, I know it !
 
@Gordon I want to through an exception when '://' is givev without a protocol.
 
moin @tereško, all
 
@GiwrgosGkogkas What about: ~(https?://)?~
But why not use the filter_var function for validating a URI?
 
@tpunt Can you explain your regex? I never used this function before and would be quite trouble some for me to change my code to work with this function.
 
8:58 AM
@GiwrgosGkogkas given that you said you also want to remove some data from the url, I'd just use parse_url and throw the exception when the result is false
 
@GiwrgosGkogkas It's too easy to screw up a regular expression. Use one of PHP's built-in functions, like filter_var (php.net/filter_var) or parse_url. It'll be a more robust solution
 

« first day (1777 days earlier)      last day (3162 days later) »