« first day (2055 days earlier)      last day (2889 days later) » 

12:00 PM
What's the difference between status. and the twitter account?
 
please don't add status of github to the auto-feed
 
Oooh you meant the actual chat feed @JayIsTooCommon?
 
i guess so. isn't it? @JayIsTooCommon o.O
 
Anonymous
@PeeHaa Yeah :-) Almost to act as a notification when it goes down but then again, we would probably notice ourselves before they update the status - So maybe not.
 
@JayIsTooCommon github is soooo flaky it will only result in spam
 
12:04 PM
it's not a slack channel here
 
Anonymous
yeah good point
 
12:15 PM
Is it possible to detect if JavaScript is disabled by PHP?
 
Anonymous
o.O
 
You just check if the v8js extension is installed :P
 
:D
 
how can someone disable javascript through php? i didn't get it :/
 
199
Q: What is the difference between client-side and server-side programming?

decezeI have this code: <script type="text/javascript"> var foo = 'bar'; <?php file_put_contents('foo.txt', ' + foo + '); ?> var baz = <?php echo 42; ?>; alert(baz); </script> Why does this not write "bar" into my text file, but alerts "42"?

Give that thread a read. It helps explain the major differences between JS and PHP
 
12:21 PM
@stack No, but the <noscript> tag has been around since like the 1990s...
So you can still make sure your pages look awesome even without JS.
 
@Oldskool got it
 
@stack <noscript><img src="https://yourdomain.com/thiswillonlybeloadedifjsisdisabled.php"></noscript>
 
ya know that feeling, when you look at legacy code ... and then get told that this is actually a 6 month old rewrite
 
@tereško LOL ... no, I don't really know that feeling. After 6 years, sure... maybe even after 2 years. But 6 months is really short.
 
Yes which is what you asked for
 
12:25 PM
yes. thx
 
@nikita2206 I saw, but I am don't understandifying
private static async Task<TResult> ExecuteSQLWithRetry<TResult, TArg>(Func<TArg, IReadOnlyDictionary<string, object>, Task<TResult>> Func, TArg Arg, IReadOnlyDictionary<string, object> Parameters, int Attempts, int BackOffMS)
I will concede that generics are maybe not the best idea when people do stuff like that
 
@DaveRandom with 'using' it would be private static async Task<TResult> ExecuteSqlWithRetry<TResult, TArg>(RetryFunc<TArg, TResult> Func, TArg Arg, ParametersDictionary Parameters, ...etc) nothing will fix those parameter names though
 
@DaveRandom god
IReadOnlyDictionary that's actually funny
See it's a good idea to prefix interfaces like that!
 
IReadOnlyPornMags
 
@DaveRandom Now that's old school!
We have something called the internet nowadays ;-)
You should try it sometime
 
12:37 PM
@DaveRandom it sets a timer to fetch all events each minute, in the eventsStore.fetchSuccess it will emit a change event every time it fetches all the events. This will rerender App class every time. Which in turn renders RfcEventTimeline class, which renders all the votes
vote classes are defined in the directory with this file github.com/beberlei/php-rfc-watch/blob/master/src/js/Event/…
 
@nikita2206 so it is just scraping then? I was hoping it was something cleverer that that :-(
 
@DaveRandom the command in github.com/beberlei/php-rfc-watch/blob/master/src/AppBundle/… is web scraping, yes
 
Still at least that means we can replicate that pretty easily
I was hoping there would be some kind of mechanism it was using to get at the raw data rather than scraping the HTML
 
@DaveRandom there is no other source other than HTML or directly connecting to the database to which @beberlei shouldn't have access probably
 
12:53 PM
what?
 
@nikita2206 I would have been surprised if it were any different but I was still hoping (I'm frequently surprised)
 
https://3v4l.org/tHdoO
How can I remove the "=>" before and quotes around Mike?
 
str_replace
 
@TechTreeDev Stop trying to parse print_r output and use a sane data transfer format
 
12:59 PM
hell, var_export() would be better than parsing debugging output
 
1:11 PM
Hi 11
 
Anonymous
Why is everyone in tech so stupid http://www.ft.com/cms/s/0/38aea12e-2410-11e6-9d4d-c11776a5124d.html https://t.co/Idzi7vAfjb
 
@dinesh while(1) would be fine.
 
i have an problem by facebook social sharing while I try facebook.com/…. it shows the share page
Yup gud @Fabor about you?
I try with image facebook.com/… shows me not found any one advice...
 
@JayIsTooCommon why is there a giant popunder on that website?!
 
1:16 PM
@Ocramius Why aren't you running an adblocker?!
 
Anonymous
@Ocramius Ikr, the tweet shows the god awful snippet though.. embarrassing if it's true. Which I doubt it is.
 
@PeeHaa Why aren't you fixing the internet?!
 
@DaveRandom Uhhhmm I am making money doing the opposite :P
 
:P
 
Everybody should block ads!
- *probably the biggest adwhore in the room*
 
1:19 PM
@PeeHaa pfft, money
 
@PeeHaa I'm running uBlock and ghostery
 
So, TIL that it's basically impossible to type an interrobang in Chrome under windows :-(
 
plus I have a bunch of hosts aliases
 
Anonymous
@DaveRandom noob
 
@Ocramius Run it harder! :P
 
1:21 PM
nah, just closed the page, CBA
 
@JayIsTooCommon tell me how to do it without copypasta and I'll happily be a n00b
 
I'll probably visit it from a firefox installed in a docker container, if I really must
fact is, I must do nothing ;-)
 
Anonymous
@DaveRandom .. Back off....
 
@Ocramius Certainly a valid option
 
@DaveRandom well… you could cut&paste instead of copy&paste…
 
Anonymous
1:24 PM
Boom ^ @DaveRandom = Noob. ‽
 
Anonymous
:P
 
I'm struggling to think of a come back that isn't along that lines of "I interrobanged yo momma" so I think I will just admit defeat
 
lolwut..
 
lolwut‽
 
@DaveRandom :-)
 
1:29 PM
poker face ^
Dat feeling after you do a large refactoring, and after you run that thing, and everything goes smoothly
 
dutch php conference booked.. now hope that its worth the pricetag..
 
@Saitama tick tick tick tick
 
Anonymous
@DamienOvereem How much?
 
E400,- p.p. for 2 days
 
@DaveRandom :D
nope, I fucked a lil' thing there, cache headers were not being set... :P
 
1:49 PM
Guaranteed way to burn your tongue.
 
looks yummy!
 
take a look at first comment
 
Anonymous
> I'll just order a pizza and make waffles.
 
2:02 PM
Just get two pizzas and cook them both. Then put one face down on the other. Job done.
 
Anonymous
^
 
Does that count as a sandwich?
 
2:18 PM
Hello
I have a question, somebody can help me?
 
when I was young I've did an omelet in the sandwich iron
 
Anonymous
How did it go?
 
@FederickJons Just ask, don't ask to ask, friend.
 
very well, actually
 
OK kevin
I have an app working in android
I really don't know too much about php
so I need a guide to make something like this
 
2:21 PM
You'll need to also actually learn SQL, I wouldn't recommend trying to avoid it if you don't know it yet
 
Ekn
wut
 
@JayIsTooCommon CakePHP? No lol.
 
Anonymous
He just edited question..
 
I make an app in android studio
connecdting with a mysqldatabase
 
2:22 PM
Frameworks area great for learning... frameworks. Not PHP, SQL, or HTTP itself.
 
now i need a platform in php
to make a few query to the database
because another person have to use the system
so the other person have to upload data, insert new data and delete data
 
@FederickJons So just make a CRUD API, then connect your Android & PHP frontends to the API
 
the android is already connected
So i need a login, and after that few buttons to select the table that want to modify the person
I know there is something in internet with this structure
and help me to not starting over
 
hi all
imgur.com/PmPbv8V
i want to get array of data from above mentioned
 
Anonymous
@KevinMGranger Yep agreed, though he asked for a 'project' with it already built in at first :P
 
2:27 PM
yes
not a FULL PROJECT
 
@FederickJons I dont know what 'structure' you want, but this is something you can write in a day in raw PHP.
 
but, you know, asp.net have a template with boostrap that you have ABM
something like this
ok @MattPrelude show me something where I can start
structure = template
like a login with validation
 
@FederickJons If you aren't willing to do this little from scratch I suggest hiring a developer. Your login should be validated in your API layer.
 
or templates with tables that you have to connect with the database
 
That sounds like you're looking for ActiveRecord, which is a JavaScript thing.
 
2:29 PM
Well I think doing with php
 
ReactJS, Backbone or AngularJS with a PHP (maybe Silex, you don't really need a framework) API would be your best bet
 
but may be is more easy with html5, css and javascript
 
2:42 PM
 
2:55 PM
RoR will be removed jQuery from dependency list o.O
 
@AdilIlhan That's a very dubious dependency to begin with. It should be a choice whether or not you want to use jQuery.
The framework itself shouldn't rely on it.
 
lol. I've just received an email from some hosting company in spain that found my profile here. If I'm willing to do a freelance project in creating the same service as gmail is offering xD
 
Yo folks
what's the fastest way to see if array keys intersect at least once?
thinking php.net/manual/en/function.array-intersect-key.php, but I really don't care if more than 1 key intersects
 
3:15 PM
Trying to store an array of numbers in mysql.. for example [102, 3012, 210, 593]

How would you guys go about doing this?
 
@Ocramius An alternative would be to loop over the first array and check array_key_exists() on array 2. Then just break when a match is found. But I'm not sure if that would be much faster.
 
Yeh, that's what I thought too
but it's the current approach
 
@user2800382 serialize, json_encode, etc...
 
@Ocramius it also depends on the array sizes
for smaller arrays array_intersect_key would be the fastest, is it for Doctrine? Maybe write an extension with PHP-polyfill that implements some performance-sensitive computations? It can be not part of Doctrine at all, just use some global functions in Doctrine that you would override in an ext
 
I think json_encode would work best
it will be a small array with 5-60 4 digit number values
 
3:25 PM
@nikita2206 no, it would be for the service manager in zf2
I expect something like max 100 services
it also is only for aliases, which I really hate :P
 
@Ocramius It appears array_intersect_key is faster: 3v4l.org/OFYZQ
 
weird, I'm getting conflicting results with my benchmarks
 
it severly depends on the amount of elements in arrays. If they're too big, then the high cost of function call (array_key_exist) starts to show up more...
 
@Oldskool if you don't use "null" then you can use isset instead of array_key_exist
and isset should be faster than array_key_exist
let me try
 
Also, what kind of keys do you expect to get? Integers or strings?
 
3:36 PM
@nikita2206 yeah, aware of that... weird results nonetheless tho
Mostly strings
 
@AdilIlhan Interesting. Although array_intersect_key still seems to win in most cases. But it's close.
well, in the later versions. In 5.x, the differences are bigger.
 
There's so many variables here, the best algorithm would be to directly compare buckets in the hashtable one by one, they are already sorted by the hash value so you don't even need to pre-sort them - that would be stable and fast approach
Anyway, @Ocramius isn't it the operation that is performed at the "build time" in service manager? It probably generates something like Symfony does with its DI/SL
 
@nikita2206 no, it doesn't
the servicemanager is mostly runtime, because the factories it has are basically what symfony does at compile time
I'd still love to compile it, but I have no time to work on it
 
weird result from my local
according to results of 3v4l.org foreach slower than array_insersect_key
 
3:47 PM
maybe xdebug?
 
i sent output of "php -v"
 
ah, nvm then
 
➜ adil php -m|grep -i debug
➜ adil
just in case...
 
@Ocramius oh yeah I remember working with factories in ZF2, it's kind of a pain... and they couldn't use closures as factories because they were not cacheable. In that case try using array_intersect_keys with bloom filter maybe? I guess if you have an intersecting key you need to work out some alias - with blooms aliases would generally work slower then
 
groan
I just wish the feature didn't exist :P
 
3:50 PM
yeah, they cause troubles in sf2 too
 
@user2800382 how about pack()?
$foo = [];

for ( $i = 0; $i < 25; ++$i ) {
	$foo[] = mt_rand(1000, 9999);
}

$bar = array_merge(['n*'],$foo);

echo strlen($packed = call_user_func_array('pack', $bar));

var_dump(unpack('n*', $packed));
the length of your storage string will always be 2 * num-elements
 
Anonymous
@Phoenix how was the code review? I see it worked for you
 
Hello Everybody
Does anybody know ipad app development here...
 
user3473379
4:05 PM
hello every one it is possible to ask a question here?
 
@surfer Read the room description at the top right
 
user3473379
I got a problem with mysql &php query when I run my query on phpmyadmin I get the correct answer but when i run my PHP page it show empty row in my table . paste.ofcode.org/36x3wNtGZTJv5U9iSvK7BtN i put insdie the sql query and tables
 
user3473379
Just let me know what to show you. I sit on this problem 4 days already without answer. i tried to to a working query but i think it is not good
 
Turns out array_intersect_keys() is faster in most scenarios, @nikita2206
 
Well, today is a good day. We are being given funding to buy several NVIDIA DGX-1 systems.
 
4:17 PM
@samayo THanks a lot
 
Whoohoo!
 
@LeviMorrison smells like neural networks
@nikita2206 do you know of any list of internal functions optimized to opcodes?
 
@Ocramius They are good for neural networks, yes. However they have really good double precision floating point performance which is good for practically all the other GPU compute problems.
We'd prefer to wait and buy the P100 next year from an OEM vendor but the funding is now so we're buying the DGX-1 since that is literally the only option for buying P100's this year.
 
@Ocramius nope
 
user3473379
?
 
4:23 PM
@nikita2206 alright, thanks anyway :)
 
np :)
 
user3473379
please guys maybe you want me to write all the data here without past.ofcode.org link?
 
@surfer maybe the problem is not the sql bit (which by the way has a security issue in it)
 
user3473379
@Ocramius security issues i will fix later on . first i need to finish the features =
 
user3473379
:(
 
user3473379
 
4:45 PM
Hellow guys, where can i set ini_set('memory_limit','-1'); in code igniter, need to download around 2gb.
 
why are you trying to download a file of size 2 GiB using PHP at all?
 
pr0n
 
Speaking of memory_limit. Can somebody tell me wth this changelog is trying to tell me
Resource Limits
Name	Default	Changeable	Changelog
memory_limit	"128M"	PHP_INI_ALL	"8M" before PHP 5.2.0, "16M" in PHP 5.2.0
 
exec("wget")
 
i have changed my php.ini to memory_limit = 2048M but no use
 
4:49 PM
3 mins ago, by Saitama
why are you trying to download a file of size 2 GiB using PHP at all?
 
8m/16m wat!?
 
@Crysis but-why.gif i.imgur.com/TnQRX6v.gif
 
downloading a 2G file with PHP will take more than 2G
 
it shows error Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted
ram size is good 8gb
 
@Crysis Use phpinfo() to check where it is set and which ini to change
 
4:51 PM
ya in phpinfo() its set i can see it, but if trying download the file it shows the error.
 
> ya in phpinfo() its set i can see it
The error message says something else
 
I think I found the root of the problem:
Apr 26 at 7:01, by Crysis
hai guys how to upload 1gb zip file into a database, either in mysql or sql server.
 
what wrong has wget done, dat you are using php to download files...? Y?
 
Only thing I suppose it could be is suhosin
@tereško Wait wat
Worst idea of the day \o/
 
goes to...
 
4:58 PM
this user has a very .. emm .. illuminating profile history
 
Anonymous
@tereško What's your intake on Core m5-6Y57 processors, for running programming-related apps?
 
5:34 PM
@bwoebi Maybe I missed a message somewhere but weren't you going to proceed with union types?
 
@LeviMorrison @Danack wanted to have review of the RFC this evening and then I'm going to submit it to vote (or announce it this evening and put it tomorrow to vote)
 
is there any route to capture all the incoming requests, in fastroute?
 
Don't define routes and handle it in the not found route
:P
 
hmmm...
 
XY problem detected btw
 
5:37 PM
!!google xy problem
 
Search for "xy problem" (https://www.google.com/search?q=xy+problem&lr=lang_en)
• What is the XY problem? - Meta Stack Exchange - The XY problem is asking about your attempted solution rather than your actual …. The X-Y Problem,… (http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem)
• The XY Problem - Asking about your attempted solution rather than your actual problem. (http://xyproblem.info/)
• XyProblem - Greg's Wiki - The X-Y Problem, as it is sometimes called, is a mental block which leads to enormous amounts of w… (http://mywiki.wooledge.org/XyProblem)
 
As in what are you trying to do / what is the use case @Saitama
 
@Saitama Just... don't route anything and don't use fastroute?
lol
 
:D
 
1 min ago, by PeeHaa
As in what are you trying to do / what is the use case @Saitama
 
5:42 PM
oh... :P
 
Don't tell us what you think you need to do tell us why/what you need to do
<n00b> How can I echo the last three characters in a filename?
<feline> If they're in a variable: echo ${foo: -3}
<feline> Why 3 characters? What do you REALLY want?
<feline> Do you want the extension?
<n00b> Yes.
<feline> Then ASK FOR WHAT YOU WANT!
<feline> There's no guarantee that every filename will have a three-letter extension,
<feline> so blindly grabbing three characters does not solve the problem.
<feline> echo ${foo##*.}
 
kk, got it :P lemme construct the question then... :D
 
:)
 
I created an function which would map the incoming requests, and try to get the the requested resource from the doc root of the server... so for that function every request should be handled by the same route handler...
^ does that make any sense?
 
5:47 PM
:|
 
I don't see why you would need fastroute if you are just going to map urls -> fs paths
 
there can be some hardcoded routing definitions tho...
 
My XY problem detector is still not satisfied
 
shit...
I give up
 
Are you trying to create something like apache's fallbackresource / nginx's try_url?
 
5:49 PM
that's it!
 
You are bad at explaining what you want to do :P
 
inorite...
P
 
In that case my not found handler wasn't even complete shit
Just check if the requested file exists in the not found handler
 
yeah.. would try that out... :D
 
:-)
 
5:51 PM
no worries, not found logic is implemented in the mapper only!
tho, I gtg to sleep now, so, nite...
 
later o/
 
i got to push my commits for today to github first.. then gonna go to sleep...
 
Wes
evening folks
 
hey Wes
 
@PeeHaa isn't it obvious? version minor < 5.2: 8 MB. version minor == 5.2: 16 MB. version minor > 5.2: 128 MB?
 
6:01 PM
Oh that's stupid
The changelog should include all changes
 
it does?
 
yes
it's a changelog :)
 
I mean, it does include all the changes already?
 
oh no
> "8M" before PHP 5.2.0, "16M" in PHP 5.2.0
There is no 128mb in there
@Wes evening
 
but that's the current value?
 
6:03 PM
so is utf8 default for htmlspecialchars
!!docs htmlspecialchars
 
[ htmlspecialchars() ] Convert special characters to HTML entities
 
A changelog should contain all changes like everywhere else
 
@PeeHaa sure
@PeeHaa the changelog shall describe the old values
the current values are visible in main docs
 
No it shall not
 
uhm…
 
6:06 PM
Any changelog on php.net shows the new value
 
Wes
summer has arrived! ans so they have the allergies \o/
 
Think about it. You create a new github release for something and only mention the old values :-)
@Wes allergies ?
 
Wes
like, to pollen
 
@PeeHaa that's bad :-/
 
aww did the flowers make you sick @Wes ?
 
6:09 PM
lol ^
@bwoebi Of course it's not bad. It's common sense
 
Wes
trees, not flowers
 
o_O
 
2 mins ago, by PeeHaa
Think about it. You create a new github release for something and only mention the old values :-)
 
Seeds of evil @Wes
 
@Wes pollen comes from flowers, also tree's commonly flower ...
I'm only messing about, I know it's not made up ...
 
6:12 PM
Cherry tree
 
Wes
it's not funny. it's a serious thing @JoeWatkins
 
I know, I know
 
Wes
for example i once sneezed a maccherone through my nose
which i ate like one hour before
 
is that a refutation of the hypothesis that it's not funny ??
because it's not a very good one
 
Wes
ahah
 
6:14 PM
Seems like a good way to clear your sinuses, although I might have used rotelle
 
Ekn
 
@PeeHaa oh, for release logs definitely not. But for logs in docs, it should. Like the htmlentities() page is not showing what the value before 5.4 was for $encoding.
 
Wes
have you ever heard someone sneezing like ten times in a row?
 
evenin
 
Wes
if yes, consider that i can go up to 30
 
6:16 PM
@Wes Yes… myself :x
@Wes well, 30 … are you sure you're not exaggerating? :-D
 
[ htmlentities() ] Convert all applicable characters to HTML entities
 
@tereško ohai
 
Ekn
evenin'
 
Guys and you help me with nginx and docker, please? nginx on host somehow ignores proxy_pass and it shows port from docker
 
Wes
6:17 PM
@bwoebi i'm not. it doesn't happen often clearly. but it's not even a serious condition, it's just very annoying
 
Actually we need both @bwoebi
 
```
php --rf htmlentities
Function [ <internal:standard> function htmlentities ] {

- Parameters [4] {
Parameter #0 [ <required> $string ]
Parameter #1 [ <optional> $quote_style ]
Parameter #2 [ <optional> $charset ]
Parameter #3 [ <optional> $double_encode ]
}
}
```
 
@PeeHaa With that I can agree
 
What do you mean by shows port?
 
Ekn
!!urban elephpant
 
6:17 PM
[ elephpant ] Either adorable, elephantine mascot of the PHP project or a person who is afflicted with PHP ... IF not Jeeves, of course.
4
 
Too bad that default is not shown there
 
Ekn
: >
 
@Wes Exactly … In 95% of cases when I'm sneezing, I'm sneezing at least two consecutive times…
 
@Jeeves lol awesome gif
 
more typical is sneezing three times…
 
Wes
6:19 PM
 
@Ekn was that you who added it? :-D
 
The other day I only sneezed once... I'm worried there might be something wrong with me...
 
@Trowski haha just that
 
Ekn
@bwoebi yes :D
 
Wes
are you also "allergic to the sunlight"? do you know what i mean?
 
6:22 PM
@Wes I know what you mean… My sister likes these very quick sunburns… but thank god I'm not.
 
Wes
it's a serious thing genetics.thetech.org/ask/ask239
more accurate.
 
wtf
 
@Wes Yep, this happens to me sometimes.
 
Wes
can you guys suggest a good mechanical keyboard? (i already have one, i should probably try to replace the switches that are leaving me)
 
2 messages moved to Orphan GIFs
So much moving parts
 

« first day (2055 days earlier)      last day (2889 days later) »