« first day (1274 days earlier)      last day (3660 days later) » 

12:37 AM
@NikiC Still no examples on generator documentation page? Shame on you ^^
 
Gosh, PHP is pain.
^^
 
12:49 AM
I suck at C.
Goodnight.
 
Kinda slow this Rebecca-night.
I guess everyone is partying.
I wonder if people are chilling in the front seat? or maybe the back seat?
 
root@tootski:/opt/php-src# ./sapi/cli/php json.php
Fatal error: Cannot access empty property in /opt/php-src/json.php on line 4
Doesn't look like chilling.
It's 3AM. I have no life.
 
user895378
@TOOTSKI If it makes you feel any better it's 2100 on a Friday night and I'm about to settle in for a long, sexy night of coding.
 
@rdlowrey Copycat
 
@rdlowrey Tell me it's in lingerie, glass of wine, candle light?
 
user895378
1:02 AM
@TOOTSKI It wasn't, but that might change now that you mention it.
 
@TOOTSKI morning :P
 
So, it wasn't slow at all.
Everyone was just in their cage, coding away.
 
I can't get no sleep pam pam pam pam pam pam pam pam INSOMNIA
 
ಠ_ಠ
 
nolifer and nobody Party, Every Friday Night @ Room 11
 
1:29 AM
I just left a comment on Google's answer saying it's wrong.
Someone broke PHP object property accessing.
 
1:58 AM
Does anybody here actually use the @covers annotation for their PHPUnit tests?
 
@cspray It doesn't do what I originally thought it did. I recommend not using it.
I guess the idea is to restrict the coverage to only what you specify which could be useful. Maybe. Maybe.
 
@LeviMorrison What was it you thought it did?
 
user895378
2:21 AM
I originally used @covers as well. I now think it serves no purpose but to massively waste your time.
 
user895378
If you're billing by the hour and the person paying has bottomless pockets use @covers on everything.
 
user895378
If you actually have to get things done just get coverage. Don't fixate on making everything a perfect unit test with no overlap.
 
2:54 AM
@cspray I originally I thought you had to put it there to get code coverage at all. Just a misunderstanding.
 
Ah, yea, I came to the same general conclusions that it isn't worth it
 
I can see using @covers later in a project when you aren't restructuring the project each month. You can really nail down stability and coverage then but until then it just slows you down.
And in my experience many projects don't make it that far ^^
 
@TOOTSKI link?
@TOOTSKI you did
@TOOTSKI yes, I can (from master all the way back to 5.0.0): 3v4l.org/8pKE1 It's how you construct the class that matters. Casting from an array changes numeric keys in bad ways (and buggy). Whereas this question was about objects with numeric keys, not casted arrays... — ircmaxell 17 secs ago
 
 
4 hours later…
7:14 AM
 
7:38 AM
@Jimbo der?
 
@Venu What?
 
i need your small help
 
My help is pretty large
 
i am getting this value from server "ONR4R(21) with name mytest from protocol IR(11)"
i need to get substring mytest from the above.
how to do that one
 
will it always be "mytest"?
or could it change?
Will it always be between "name" and "from"?
 
8:07 AM
Good morning
 
@LeviMorrison patch updaed
moin all
> // int is not a valid type declaration
would be inconsistent with php, we take int to mean a class of type int like all other type hints
 
8:39 AM
good morings
 
mnorign
 
mrgning
 
@Jimbo print levenshtein("mnorign", "morning");
4!
 
moreling
 
9:03 AM
@LeviMorrison bah, not my job
 
9:45 AM
morening @NikiC
anyone prob look interesting for you this CJ ?
 
Morning @JoeWatkins
 
10:01 AM
I wan to check if string contains number or `.` then replace it with ""

$buffer= "test. 8090";

if PREG_REPLACE('/[0-9]+[.]/', '', $buffer)
{
echo $buffer;
}
what is error here?
 
@Programming_crazy /[\d.]/ is what you need
 
@CSᵠ '' thanks but still it gives error
here is test : ideone.com/KgFm3I
 
@Programming_crazy Gave you just a fishing pole
 
10:20 AM
1 message moved to Trash can
 
DS9
hello... i have a problem in timezone_name_from_abbr.
i use this code: $timezoneOffset = "05:30";
echo $timezone_name = timezone_name_from_abbr("",$timezoneOffset*3600,0);
 
@Programming_crazy str_replace(".", "", $buffer);
 
DS9
output: Asia/Karachi

Expected output: Asia/Kolkata
any help?
 
10:46 AM
damned hangover
 
That question is like "How do I build UI" -_-
It's like "How do I build an interenets, with BackboneJS"
 
DS9
11:03 AM
any help with timezone_name_from_abbr?
 
Morning
 
mornitnh
 
mornin'
 
@ircmaxell AH. Fail on me. Great.
 
So, what you guys building today?
 
11:16 AM
Implementing, shit needs to be fixed.
 
At least you don't have endif's EVERYWHERE :P
and print().
 
:O
No, we made a deal not to use that, and avoid e.g. switch.
There were shitload of switches, when arrays could be used.
 
DS9
need help for this quetion:
[why timezone_name_from_abbr fetching wrong result?](http://stackoverflow.com/questions/23028712/why-timezone-name-from-abbr-fetching-wrong-result)
 
I guess once someone has it in their mind to do it a certain way it's doomed from there.
 
I am decluttering the basement. Anyone know whether a Commodore Amiga 500 or a Commodore CDTV is worth something today?
 
@Gordon The CDTV is rarer than the 500 and may be worth a little.
 
@Danack how muchs a little? 50 bucks?
 
eBay is your best bet for a price.
 
@Gordon From a quick google maybe 70 euro.
 
DS9
11:35 AM
@Danack Beacause 05:30 is a offset for Asia/Kolkata and the result says it is Asia/Karachi
 
@Fabien i couldnt find any on ebay
@Danack hmm. good enough. thanks
 
@Gordon Turn it in to a webserver :)
 
@Fabien i would have to invest several hundred euros into it to make that work, so no :)
 
heh true. Still would've been a cool web server.
 
anyways, gotta move it from the trash pile back to the keep pile
laters
 
11:37 AM
Er - no. You've got them the wrong way round. From the links:
Current Date and Time in Asia/Kolkata
Sat 12-Apr-2014 05:01 P.M.
Current Date and Time in Asia/Karachi
Sat 12-Apr-2014 04:31 P.M.
/pre-coffee - maybe being dumb <--
 
DS9
yes, but there is time difference of 30 minutes.
 
http://www.prokerala.com/travel/timezones/Asia/Kolkata - Asia/Kolkata time zone offset is: UTC / GMT +05:30 hours
http://www.prokerala.com/travel/timezones/Asia/Karachi - Asia/Karachi time zone offset is:
UTC / GMT +05:30 hours
 
DS9
ya,true but according to following code... $timezone = 'Asia/Kolkata';
$time = new \DateTime('now', new DateTimeZone($timezone));
$timezoneOffset = $time->format('P'); the offset for Asia/Kolkata is +05:30 and for Asia/Karachi is +05:00
 
@DS9 you're wrong when calculating the GMT offset in seconds. I've added an answer to your question.
 
DS9
so when i use timezone_name_from_abbr it return Asia/Karachi for both offset.
 
11:45 AM
Yes, you need to find a way of going from +05:30 to 19800.
 
DS9
@salathe , so what offset i pass to get result Asia/Kolkata?
 
@DS9 19800
 
DS9
ok..thanks @salathe for your help.
 
@DS9 I added a way of going from "+05:30" to 19800 if that help you. :)
 
DS9
11:57 AM
@salathe it gives following error:
Call to a member function format() on a non-object
 
@DS9 Are you using 5.5?
 
DS9
5.4.25
 
I meant for the $timezoneOffset value.
 
DS9
no
05:30
 
*le sigh*
 
11:59 AM
yes no maybe
 
Use "+05:30" as in your question.
 
DS9
ok..
Thanks ..it is working.
 
Great :)
 
How can I secure downloads? so if user found the file link, he can't download it. he needs to generate a link from the system to download it.
Are there any tutorials on this / explanations?
 
Yes.
 
12:09 PM
Can you please link me?
 
lol.
 
Morning fellows
 
4
Q: Restrict file access to authorized php users

BrynJI've inherited an application with a glaring security hole. It has session-based security, but file uploads (which are user specific) are not secured in any way and they are stored in the public file tree. Filenames do not follow any convention as such, making them hard to guess, but the data ...

There's load of different ways to do it though. If you're using nginx, you can pass the file handling back to it stackoverflow.com/questions/16189758/…
 
@YourCommonSense Morning
 
12:20 PM
I am going to ask a favor from you. If you care to spend a part of your Saturday for reading a rather huge mass of bad English, I would be mighty glad to know if you liked the idea in general (or if I succeeded in making the point at all). At least up to the Part #6. And I am also very eager to listen to any disagreements with Appendix #3. On that: phpdelusions.net/sql_injection
8
 
I starred that so people can see, will leave it, still early for USA people.
Pinned, the word is, pinned.
 
I see, thanks
 
First thing, the DROP TABLE thingy, that isn't for MySQL?
Multi queries, etc.
No, I guess that's for SELECT.
Nice, the reading is nice so far.
 
you are probably confusing particular API function with DBMS. Mysql in general supports multi queries all right. And most APIs supports them as well. PDO by default allows Bobby to drop tables, mysqli has a designated function and even old mysql_query is rumored to be able, if some secret value is passed as a last parameter to mysql_connect
 
Yes, that's it, my bad.
The Hitchhiker's Guide to SQL Injection protection http://phpdelusions.net/sql_injection
Still better than other shit found.
 
12:37 PM
"As an alternative to putting files outside of the web root, you might also find some combination of file permissions that allows PHP to read the file, but doesn't allow Apache to serve it up to the world, like chmod o-rwx, in other words, remove permissions for 'others'. "

How can I do this if PHP uses apache as it's base? Since php uses the user "Apache" it will not have permissions to access the file.
 
You have answer in your question.
 
Hello?
 
Hi all. good morning.
 
yo Dave S'up
 
@TOOTSKI In the paragraph I posted, or the question?
 
12:40 PM
Just cking out the chats on SO for first time
 
that's great !
 
Beautiful day on eastern seaboard US
thank god for SPRING!!
 
@TOOTSKI Thanks. I tried to focus on the real benefits of prepared statements. The most tricky part is to slander manual formatting. As anyone can say "I am formatting my values and have them safe" and, strictly speaking, he'll be right.
 
@JoeWatkins You have mail.
:P
 
12:45 PM
@boomcruiser - where are you in the world?
 
looks buggy yeah I will look properly later on, few things to do then I'll look ...
 
Thanks Joe, I reported something probably similar to xdebug, take a look when you can about his "solution": derickrethans.nl/advent01.html
Maybe just fix the entire damn thing for PHP.NEXT or 6 or whatever :)
(talking 'bout object properties)
 
BBL
 
Oct 22 '13 at 9:16, by tereško
@Sprottenwels $pdo->prepare('SELECT * FROM ' . $_GET['label']); would be the wrong way
Can't find more examples (there were lots of them here), but people did this right after we ended witch hunt on mysql_*
 
@TOOTSKI Yes, people tend to take the word "prepared" too lliterally. That's why I prefer the word "placeholder"
 
12:53 PM
Yes, they conclude that you can throw whatever it's magically "prepared" and safe.
> Fixed bug #64895 (Integer overflow in SndToJewish).
Totally read that "sounds too Jewish".
2
Q: php fatal error "Cannot access empty property" generated by foreach

dacI'm getting a "cannot access empty property error" on the line with the foreach in this code. print_r($captions) and print_r($updates) show the the expected values in each array. $updates is an array of checked checkboxes where the user wants to update the captions for the photos. $captions is t...

@YourCommonSense ^ totally unrelated to SQL (I was looking for "empty property"), but check the query and effort of high rep users to hint that they're doing it wrong.
I stopped caring long time ago (about Stackoverflow 1 rep users doing it wrong).
Got 10k so I can delete questions ^^
 
user895378
morning
 
morngig
 
@TOOTSKI Well, I have different view on the word "hinting" :) I'd rather call this way this some my answers, which seldom have luck to escape unnoticed from zealous citizen patrol, like this one: stackoverflow.com/a/23026230/285587 - this I call hinting :)
 
1:09 PM
:)
> How would I go about fixing this problem?
How can be easier to move from mysql_ to PDO than to mysqli_ functions? — gbestard yesterday
@rdlowrey I'm still pumped up about websuckets and phpdbg and shit :D
Compiled PHP 5.6 Beta 1, set up things...
 
@TOOTSKI Yup, and this one too. So, it seems instead of just stopping care I am trying to amuse myself as much as I can :)
Sometimes it even works. You'd never can tell if your teasing answer will be upvoted or deleted
Oh, unless it's got reported in the room 11. Then retribution is inevitable %)
 
user895378
@TOOTSKI Nice. You should install pecl/libevent and pecl/pthreads when you have time. The server will work without them but only for local testing/development. You don't want to ever put it into a production environment without those extensions.
 
user895378
Also FYI it'll likely be a couple of weeks before I'll have something you can actually hook up to a real phpdbg backend ... just focus on the frontend stuff in the meantime.
 
yo daniel
 
damn, today's hangover is kinda excessive
 
1:23 PM
@rdlowrey Sure thing, I'm also a bit stomped by the amount of paid work (takes most of my day), will try to come up with something.
 
user895378
@JoeWatkins hola
 
user895378
@TOOTSKI no worries ... it's an ongoing thing. I'm not ready for it right now anyway.
 
Yeah, but making plans is good anyways :)
 
user895378
The good thing is that the frontend and backend can be developed completely independently of one another. Neither will hold up the other :)
 
@YourCommonSense Haha, I think "review answer" vs "close question" ratio is 1 to 100. So it's mainly questions that suck (inevitably, the answers too).
@rdlowrey Yes, Daniel, that's why it's called like it's called :P :P :P
I know what you mean, at work, we did it like that, PHP just pukes JSON to frontend, and that's it.
Accepts GET, POST, PUT and PATCH .
 
1:28 PM
@TOOTSKI the bad news is that neither actually works :( 9 out of 10 bad questions never gets even single closevote. And even ones who get, seldom reach quorum, despite of all the rings. So, this is the thing I stopped caring long time ago.
 
@YourCommonSense That's true, but at least it has some impact, and it's like we're fighting zombies... cv-pls.com/?chatroom
I love when we nuke questions with 100+ upvotes ^^
> Laravel is the best thing I've ever seen in PHP world
zOMG
KILL IT
WITH FIRE
Raw PHP... O M G
 
@TOOTSKI That's just s self-delusion. Then I am feeling careless SO much as to enter the PHP tag, beside other things it's question per minute rate that makes me shiver. You'll waste your daily limit in a half-hour. I wouldn't call it any impact...
 
1:48 PM
... Didn't know it's one per minute O_o
Yeah, impact is probably weighting to 0 but... I wouldn't say it's a lost cause.
There will always be crappy questions and answers, but when you take down visited ones or straighten them, it's much more effective than mere closing of anonymous questions.
 
Hey common sense, meta is about to split, if you want attention from more people, now is the time :p
 
@YourCommonSense where are you from (if not a secret)? If you want remote job for USA company, check this out: site5.com/about/careers
 
@telkitty.exe Well, not in this matter. I grew quite accustomed to the state of things. It is feeding my misanthropy.
 
Job is to be probably only full-time developer, in charge of maintaining one app, pay is about $3000-3500 based on shit...
 
@TOOTSKI It is not and it is quite discoverable for anyone who woud bother to :) but I am looking not for a remote. In fact my primary goal is to leave my mother country that turned to be an aggressor and dictatorship.
 
2:01 PM
Russia!
 
@TOOTSKI well, $3000 is my current check but it is net amount. So, it's equal to ~5000, I assume
 
Yeah, do you pay taxes or company?
 
it is a custom here that company pays taxes
 
I might open up tax avoidance agency :D (in Bosnia)
 
@TOOTSKI oh, rather, supposed to pay. in fact, my current check is split into "white"-half and "dark"-half
 
2:05 PM
I know what you're saying. Why don't you apply to e.g. Facebook?
They can get papers pretty quickly and without hassle.
 
Good Idea. I never thought of that. In fact I am very weak in selling myself. Never did it in my life
 
@YourCommonSense example from Careers.SE ... It's better to contact a recruiter so they get you "link" to some coding quiz or something, if you pass that, then you're interviewed and should be it. Notice that task is a puzzle like, I suck there, and I've quit.
If you're leaving, leave for USA, you won't get better salary than you have in Europe.
(not a rule of course, but I've tried, a lot)
 
I am not after salary at all. I never wanted to be rich and I have no expensive habits or addictions - so, it's not the matter at all
 
You can give me your excess money if you like. -_-
 
which reminds me that I need to get some food somewhere
 
2:14 PM
@YourCommonSense Then, that amount is plenty just about anywhere in EU except Switzerland. Have you looked for jobs in Deutshland? They have good foreign policy too.
 
@TOOTSKI I am not too good with braincrackers tool. All I have is some experience. I suppose they at FB wants not PHPers but rater programmers of any trade.
 
@tereško I'm preparing to go here, great food and wine and slivovitz @PeeHaa.
 
meh .. i will simply order a pizza
 
@TOOTSKI there is even a possible position in Berlin. But I keep it as a last resort. I am fond with English, and consider it quite waste to relocate into non-English-speaking country
 
But what kind of pizza?
 
2:18 PM
@YourCommonSense It's not braincracker, it's pure shit... like tower of hanoi problem... have 'bout the same feeling for Berlin, I could learn the language if given e.g. 5 years, but... Amsterdam.
 
@Fabien probably this one or this .. haven't decided yet
 
Look delicious. Pizza is the most expensive take out here.
first one looks best.
 
Pizza here is about 5€ :) Made in furnace.
 
Damn. Looking at around £15 here.
 
@telkitty.exe oh, I thought they're going to split in opinions... Wondered what it would be. But that's literally. Honestly, I don't care for meta. It's quite strange place. I managed to tell them once what I think of them and keep my question alive (took me seeveral tries thugh)
 
2:24 PM
yay .. looks like I gave not drunk away my phone yesterday ... that's positive
 
@tereško You're still drunk, I can't understand word you're saying :P
Where were you?
I'm drunk too it appears.
 
in general area of "at work": there are two micro brewery near it and a club
 
I can. it's quite familiar feeling here %)
or, rather it was, back in my younger days
 
> Arrays are not just old-fashioned, there are good reasons to avoid exposing them.
 
Switching to windows just for photoshop is annoying.
 
2:37 PM
@LeviMorrison So, Collections, or what?
@Krishna What about it?
 
The article has some good points but anyone who has done data driven development (like I do in computational science) would scoff at it ^^
 
Hello to all
 
Ultimately I think the author of the article is taking the wrong conclusion from the situation. In this situation he's saying "Arrays are bad!" but the problem is that he's mixing high-level and low level concepts. Use one or the other and suddenly there isn't a problem ^^
 
1 message moved to bin
^ I can't figure out if this is some kind of joke.
 
epic crap
and it can't be closed..
 
2:48 PM
is there any way to change default port in phpstorm from 63342 to 80, so that i can access
http://localhost:63342/bill/admin.php
like this
http://localhost/bill/admin.php
 
questions get more and more lame
 
can some one pls answer my question
 
I don't think I've seen an interesting question in a year
 
Starting to think that @YourCommonSense is right.
I had different picture, but looking at stats... it sucks.
@NikiC Especially for a person of your caliber.
 
2:55 PM
@NikiC well, I asked some of them :p
 
@AlmaDo You did?
 
@TOOTSKI The other take-away from the article: returning unmodifiable stuff is fast and it leaves copying it to the user if needed at all.
 
such as this (in this year)
 
For all we know the user just wants to read the values.
 
we spent several hours with @Jack to find good solution
 
2:56 PM
@LeviMorrison Yes, I couldn't quite understand it, I've read it tho. But I can't see the point of e.g. how it relates to PHP, I can't say that arrays are bad. Again, you're probably into that more with your super 'puter :)
@AlmaDo Have an upvote, both of you.
 
It's less useful in PHP because we don't have the control there is in Java and especially not the control of C++.
It's just funny to hear someone post "Don't use arrays" and then cite "because performance"
 
@TOOTSKI the origin is in bcmath which can't understand scientific notation. Because - I don't know:p I've looked into source code and it's just doesn't contain this implementation
 

« first day (1274 days earlier)      last day (3660 days later) »