« first day (1998 days earlier)      last day (3172 days later) » 

13:05
Can I do a redirection using htaccess? @jimbo
@astrosixer Fetching: bfy.tw/56XJ
any expert on laravel? need help on this. stackoverflow.com/questions/36408720/…
@StormSpirit Stop spamming your question please! Obviously no one has any idea.
@StormSpirit Don't Repeat Yourself
13:10
Seriously stop spamming @StormSpirit
sorry sir. I tought someone will online new.
@bwoebi incomplete draft (only done the background so far): wiki.php.net/rfc/short_list_syntax
I mean can i give two different level of redirection for a same link?@jimbo
@astrosixer Sorry, I answered your initial question but I'm kinda busy and don't have time to answer others, you could ask SO questions instead of in here
@Andrea looks great (and much more detailed than I would've done if I had to write it :-))
13:14
@bwoebi I'm trying my best to be clear and thorough
@Jimbo thats ok..thnx for help.
I mean, the background mostly just tells you what you probably already know, but it sets things up to make a clearer argument for why the [] syntax for list() is beneficial
It's also probably more accessible
What should i ask to php developer who has come for interview and has an experience of 1 years, to measure his skills?
@Andrea The background actually is half the RFC I think. The other sections can be much shorter anyway as they can define it as simple list() alias.
@bwoebi yeah, the proposal itself isn't very complicated
13:20
pastebin.com/A05uPdmE is this safe (ish)?
Hmm. Decent way to make sure files uploaded on a slave server are reflected on master?
3 ideas I've thought of are to use a CDN, to force master on uploads, or to use some sort of api between the two
@Sean That doesn't sound like master/slave
@Sean It downloads a PHP script too a client that generates a site template.
@PeeHaa Naturally :p
@MattCowley Uhhhhm WAT!?
No that is not safe against anything
No idea what you are doing, but that is not what you should be doing
13:23
@PeeHaa But if you looked at the script without what I just told you, would you know what it does and see it as "safe"?
@PeeHaa Agreed. Even just looking at it, it's plain to see it's not good.
Aerys App Poll: strawpoll.me/7286253
2
@MattCowley If I would have cared what it does I would have replaced eval with echo and still would have thought wtf
@PeeHaa But surely echo won't run php?
Stopped reading at eval
13:25
@MattCowley What is it you think you are doing?
"Safe" is a nonsense unit of measurement
@PeeHaa Downloading a php script to the client that then uses data on the client server to generate a site.
@kelunik Are there any Aerys apps kicking about?
It's like standing outside and asking is it "air"
@MattCowley Yes but what are you trying (and failing) to prevent
@PeeHaa Client stealing the source php easily
Well you failed
13:26
@PeeHaa Why?
Because whatever the script does. I can retrieve it within the minute
@PeeHaa Personally if I saw that I would have no idea how to get the source php
Probably less
@MattCowley That's because you are probably not a developer
@PeeHaa Nor are my clients
Then they won't know what to do with it even if it is not "obfuscated"
13:28
Then why obfuscate it in the first place?
Attach a license that suits your needs
^ that
Everything else is bollocks
2
@PeeHaa How as a minor would I enforce a license though?
Wes
Wes
@kelunik if you decide to make the issue tracker ping me when you start it. it's something i wanted to make...
Well it's either worth "stealing" and defending or it isn't
My money is on: it isn't worth it
Nothing to do with you, just a generic view
13:30
@Sean kicking about?
@PeeHaa What license would be best?
@kelunik I'd like to see Aerys working with talking to sync workers, probably requiring a messaging protocol and queue in the back end :-)
@kelunik Sorry, slang :p. Any live demos or apps using Aerys at the moment?
@Wes repo is there already, can make it public later
@MattCowley Whatever suits you. IANAL
13:31
@MattCowley what for?
@kelunik Protecting my code from distribution,resale, editing.
@Sean I have a crap text rpg POC :P
@Jimbo that's something that could be part of the issue tracker for sending Mails or so
@MattCowley if you want to forbid editing, just keep it private
Wes
Wes
@kelunik it's a bit hard for me to keep up with existing projects... i'd love to follow it from the very beginning
13:35
@kelunik That's why I made it DL from our server to prevent editing. But what license is best to stop distribution etc.?
@Jimbo most things like redis or mysql protocols are doing exactly that :-P
@kelunik well… helpful poll ... it's 4:4, :-D
Has anyone ever had PHPStorm just stop loading your projects and config?
today is dragging on ...
hmm?
body wants to sleep already, just looked at the time for first time in ages and was expecting 5 o'clock maybe ...
not even 3 ...
13:39
@kelunik I would like to see this, can I change my vote? :P
@JoeWatkins take a quick 20 min nap maybe?
@MattCowley You're still stuck on that XY problem I see. binpress.com/license/generator
doubt I'd wake up again ...
From the ##java channel @ Freenode: <javabot> php is the solution of choice for relaying mysql errors to web users. For more info, please read http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
They make it really complicated / painful to contribute ...
13:42
@MadaraUchiha Is there no blog post yet why this blog post is bad or puts PHP far worse than it actually is?
@MadaraUchiha At least ridiculously underspecced VPS X can run PHP
@kelunik more and more common now ...
@bwoebi I'm sure that there is.
@Leigh Java: Compile once, run nowhere.
@JoeWatkins Why exactly are companies requiring this?
fb, google, parrot, I think mozilla ...
13:44
@JoeWatkins Why do they need my address? Can't I just say: Do what the fuck you want with it?
I know, I don't agree with the need for them ... but they're around
@kelunik PHPMyAdmin was almost as anal (had to "personally sign off" that I wrote the patch and authorize its use)
@Machavity That's only so they can lynch you along with the rest when everyone realises how terrible it is
Yeah, but what's the point of these?
Not sure if I'm just going to close the PR.
13:46
@Jimbo Probably. I'm not too happy with the coworker who still refuses to use Workbench
@kelunik Just write that you won't bother signing it and leave it open...
@kelunik try to contribute to any google project :)
@bwoebi RFC pretty much done: wiki.php.net/rfc/short_list_syntax
@kelunik close it and sue them when they add it themselves
> Open Issues

Currently, the patch permits nesting the [] syntax form within list(). This will need to be fixed.
@Andrea ^ is that fix worth it, is the question?
Also @Andrea shall I create a PR based off my branch?
13:48
@bwoebi well, it's maybe a little implementation pain, but it's a rough edge we could do without
there's little reason to allow it
@bwoebi of course it's worth it. Think of the children!!!11
@bwoebi if you like. RFC is still in draft though, remember that
@MadaraUchiha well, each language has their own USP. Java is a DSL for generating Stack Traces.
3
I like
@Gordon :D
13:50
@Andrea Draft ...? Except the RFC status nothing indicates to me this would be a mere draft ;-D
@bwoebi I mean, I didn't put it to internals yet
:p
@bwoebi 6:3 if we count @Jimbo's vote change
oh right, uh
@bwoebi did you make sure foreach was covered?
@Andrea yep, it has support
13:53
oh, good
foreach_variable:
                variable                        { $$ = $1; }
        |       '&' variable            { $$ = zend_ast_create(ZEND_AST_REF, $2); }
        |       T_LIST '(' assignment_list ')' { $$ = $3; }
        |       '[' array_pair_list ']' { $$ = $2; }
;
ah, cool :)
Hi i need some help with working out the distance between to postcodes
<script>


var x = getDistanceFromLatLonInKm(52.482799000000000, -2.000643000000000, 52.48463500000000, -1.980759000000000);

function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2){
  console.log(lat1, lon1, lat2, lon2);
var distanceFromSpecificPoint = getDistanceFromLatLonInKm.bind(null, 52.486637, -1.890952);

  var R = 6371; // Radius of the earth in km
  var dLat = deg2rad(lat2 - lat1); // deg2rad below
  var dLon = deg2rad(lon2 - lon1);
  var a =
    Math.sin(dLat / 2) * Math.sin(dLat / 2) +
at the moment i have done this
14:03
@JackDaniels I thought you can solve any problem...
@JoeWatkins hey, broken link!
lol i can't in this case ;P
oh no, it works in here, was broken in email
That sure is some javascripty looking PHP
14:04
@SergeyTelshevsky can you help me with the code?
@bwoebi RFC now covers foreach :)
@KevinMGranger We've secretly replaced his Room 17 with Room 11. Let's see if he notices
@PhilSturgeon was late ...
I like how $ is accepted in JS variable names, so I can make a polyglot code example in the RFC :D
@JoeWatkins nono its all good, you're great! your caption of "i will hurt anyone that does this" is spot on
14:06
I don't think we should threaten ppl in the rfc tho ...
:D
hahaha no not in the RFC
God, I feel awful. Don't even drink coffee in the morning and energy drink in the afternoon.
"seriously your kneecaps are in danger"
In fact, just go to bed at a proper time and don't worry about anything else.
does this work for all of you ?
14:07
@Sean I used to do that every day. What's the problem?
@JackDaniels I suggest you may ask this question in the JavaScript room
can we stop spewing js all over my screen please, kthnx
want to see some coffeescript?
@KevinMGranger My brain is in one place and my stomach is in another :p
@SergeyTelshevsky okay i have now
14:07
@PhilSturgeon no, no, no I don't ...
@PhilSturgeon that can get you banned
@Sean but they're both awake, right?
1 message moved to bin
What's the coffeescript of PHP?
14:08
jeez, and now I am getting flashbacks
zephir ?
fuck you
@KevinMGranger I mean.. I guess :P
Isn't hack like coffeescript for php?
I learned some coffeescript when I was looking into making Atom's plugins
I am fucking traumatized
Composer goes Gold on its fifth birthday! v1.0.0 now available! https://seld.be/notes/composer-goes-gold #composerphp
2
oh wow
@PhilSturgeon omg
I still remember the days when everyone in here was super-confused about composer being "a tool of the devil"
14:09
it's not really gold, it's a spray painted floppy disk ...
@JoeWatkins a programming language with no code samples on its landing page... now I've seen everything.
@Ocramius I heard someone say "dependency hell" in the context of php the other day ...
@Ocramius haha! i bet
@Ocramius It is just like any other package/dep manager
better than many. learned from plenty of others mistakes
go has a few pieces of shit as dep manager.
14:12
I think the other good one I saw so far is haskell's
lock file et all implemented correctly
the cults that rebel against the use of composer are yet to really emerge yet, there's murmurings ... and they'll come ...
and they'll be all in our face ...
> "Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn't stop to think if they should."
(~ Jurassic Park)
it didnt need the attribution surely
14:14
Well it's there now
@JoeWatkins oh meh it's just going to be tony marston and a few other aged hacks banging on about how terrible it is to have these powerful tools because it involves changing how you think, and when you've been thinking one way for 20 years its hard
I DONT LIKE CHANGE
I blame this energy drink. ):
Charming
Bobs-MacBook-Pro-2:php-src-X bob$ ./sapi/cli/php -r 'list($a, [$b]) = $c;'

Fatal error: Cannot mix [] and list() in Command line code on line 1
^ @Andrea (pushed)
Someone emails you, asks for help with your library, you spend time testing their code (which the library works perfectly for, btw), and then the response I get is: "I will take a look at this later, just bogged down with something else at the minute."
14:17
Unrelatedly, how is the typed properties RFC coming along?
@bwoebi oh, awesome :)
@Andrea After all, that allowed me to remove the duplication in parser; thus not too bad
@Sean pretty good, I think ...
@bwoebi :D
phil has some updating to do ...
14:18
/me is currently updating
@Andrea "28 additions, 50 deletions" :-) I like these bug fixes which remove more than they add ^^
@bwoebi yep
some of my proudest refactorings are ones where I just delete a hell of a lot of code
14:19
hehehehe
oh me too. v2 of the API at work was about 20% of v1.4.
@Andrea please add https://github.com/php/php-src/pull/1849 as reference to the RFC
@PhilSturgeon I was thinking that looked like the coffeescript website, and then I saw npm. Did they literally fork coffeescript?!
copy, paste, delete, laugh, drink, write more bad code
35a0cfe fix stuff that was apparently not properly fixed in the last few commits
2066abf change fix for stuff that was fixed earlier after being broken...
c00ac08 add means to test fixed stuff...
c9baa7c fix broken stuff...
I like those commit messages
14:20
@bwoebi missing a pull/. but yeah I'll add that to the patch bit
@Sean just updated mixed declarations wiki.php.net/rfc/typed-properties /cc @JoeWatkins
@Andrea ftfy :-P ... That'll learn me to not write links manually :-D
These URLs are far too complicated pfff
RFC updated ^^
the second example needs correction
just did
:)
14:23
> As such, mixing or types with a multiple properties statement is not allowed, and will cause a parser error:
Is it just me, or does that not make a lot of sense?
oh thats not right
no it doesnt make sense
i shouldnt RFC hungover
Wise words to live by :p
mixing OF
Mixing type declarations in a grouped statement is not allowed, and will cause a parser error:
@Andrea You forgot to remove the Open issues section
@JoeWatkins any updates on performance, or anything else?
14:26
@bwoebi Oh, thank you for reminding me :)
@bwoebi Removed that open issue, now it just says “None”
:-)
> By the time the patch is merged, performance impact will have been mitigated, as far as possible.
just remove that I think ...
@JoeWatkins that probably would mean we'd have to wait until 7.2 ^^
I think we done everything we can for performance ...
we can only make it faster now by making normal access slower, which isn't happening ...
yeah
the other stuff was stuff that dmitry raised but not necessarily needing to be mentioned in rfc ...
> applied in the say way.
> Opcache has been patched, needs review.
=>
> Opcache has been patched.
(dmitry done it already)
lovely!
so the general performance consensus is "using typed properties is slower than using mixed properties but stops you needing to is_foo() which is much slower than using the syntax approach"
amirite?
thats not exactly RFC language but thats the general idea
that's basically it ...
wondering how much slower. I think it will barely be noticeable
the cost of checking scalar types isn't worth talking about like it matters at all ...
we cache all we can for complex types (classes), so they get faster after the first check (in any particular scope) ... after that initial lookup, the cost of that is also negligible ....
dmitry and someone else is working on an optimization that gives us some clue how much faster it is to execute FETCH_OBJ_R directly, rather than via a method, there is >2x perf increase ...
(which is what you are doing when you omit the getter call)
be a bit different, because they aren't doing type verification there ... but cutting out the method call leads to a good increase whatever ...
14:44
If it doesn't affect you if you don't use them, perf shouldn't be that much of a concern, right?
Yeah, saw the getter optimization thread. That one is interesting indeed: we've been optimizing getters away in libs where sensitive
I'm not sure I like it ...
I was discussing yesterday if it was possible to implement is_pure($ast)
to allow optimizing it for inlining
can't remember where tho
e'nin
oh var_dump, maybe put a section on that up ...
uninitialized typed props show "uninitialized(type)"
14:49
Would you say a vector that allows me to possibly (as in, sometimes works, sometimes doesn't), enumerate a cloudflare users domains counts as a vulnerability I should disclose to them?
yeah, probably ...
I don't know the name of the user, just the association between domains
I'll ping them on hackerone, worse they can do is say it's invalid
I would guess it's not meant to leak, and it leaking somtimes is a bug ...
@JoeWatkins that looks like problem is too specific... It'd be better done in a more generic way than "optimize only methods that have only ZEND_FETCH_OBJ_R and ZEND_RETURN"
doesn't seem to be any improvement in it whatever ...
even if you widened to anything with that sequence, it would be weird that a method with return type was not optimized ...
and if you handle the return type, the code is becoming as complex as just executing the original code ...
14:58
@JoeWatkins yeah, this too
0
Q: Calculation with eval() in PHP

Spiderman5I use function eval() to calculate the expression, which is entered by user. It works very well, but there is a problem with brackets ( and ). But if I write the expression in code with brackets, it works. if (!isset($_POST["Submit"])) { echo "<form action='' method='post'> <input sty...

What could go wrong?
user924016
mornings
user924016
Anything new =)
@Andrea anything left before we're ready to announce it on-list?
Anonymous
15:09
@Oldskool Nothing. Absolutely nothing ;)
@bwoebi Maybe the case for why we should have it could be stronger, but I can't think of anything else. Also, I ought to write a language spec patch at some point
@Andrea spec patch isn't necessary to push to discussion though - and possibly someone on list has good arguments which may be incorporated into the RFC then
@Jay People like that can really get under my skin. The fact that they make the mistake is one thing, but ignore all the cautions in the comments and saying "people, please relax, I know what I'm doing", while they are clearly clueless... that kills me a little on the inside.
user924016
hehe
It's like seeing a toddler driving a car off the driveway saying "Relax, I've driven tons of miles, I won't wreck my dad's car into the neighbours house!"... :(
Anonymous
15:14
lol
a toddler would say "I've been driving down this road for nearly 100 years and 2 weeks of minutes" ...
@JoeWatkins LOL
also, "that's my friends dad's house and he said I could drive into it ... I drove into it last year, yesterday" ...
Just added another comment with a little example that might wake him up (probably not, but well, I tried...): stackoverflow.com/questions/36429868/…
Anonymous
@Oldskool 'touch('eval_just_rekt_your_server')' xD
15:20
> $ touch /this
touch: cannot touch ‘/this’: Permission denied
@MadaraUchiha That's why it has no leading slash, so it will be relative to the script path.
@Oldskool Whoosh
OH LOL
yes... I did
just got it
I bow in shame to MC HAmmer
I hope he forgives me.
Can anyone see why the UPDATE query isn't updating the row. pastebin.com/5Ku1btxM
15:26
@AboutLeros PDO should tell you that. Probably a type mismatch or something (trying to set a string on an int field or vice versa).
@MadaraUchiha break it down ssuuuudooooo o o o o
I've lost it today, it's too warm and I'm incredibly bored
@Jimbo Do a cartwheel
@Leigh No errors
@AboutLeros What is the literal query that is executed? After the statements are prepared and the vars have been set?
Anonymous
@Jimbo I'm not trying to be a stalker, but is your blog down?
15:35
@Oldskool what do you mean by literal query?
@AboutLeros Like the actual query that is sent to your database.
@Jay Yeah, I haven't put it back up since... 2014
Anonymous
@Jimbo That'll be why..
:-)
@AboutLeros Additionaly, you probably want to add a WHERE clause to your query.
15:37
@Oldskool I tried and got internal error
But by the look of it, you might also be mixing up INSERT INTO with UPDATE.
@Oldskool Agreed, it's doing my head in, how do you UPDATE by current user id, it's so frustrating.
UPDATE x WHERE user_id = y. Given the table you are updating has a user_id field.
dev.mysql.com/doc/refman/5.7/en/update.html .. assuming you're using mysql. But update is pretty much the same in all SQL dialects.
wait so the WHERE = "#" is according to the column not row?
no, the where specifies the row(s) to update, usually by a column name.
So if you have a column user_id, then WHERE user_id = 1 updates only the rows having value 1 in the user_id column.
15:43
oh, was just going to say. lol
Pretty basic SQL stuff really, maybe you want to check out a tutorial first before diving in too deep :-)
@Oldskool yes, thats a bit dumb. I knew this before, just was double checking
I tried adding WHERE user_id=".$_SESSION["user_id"];
but didn't work
can you even update an image into a table or does it have to be INSERT?
mornin'

« first day (1998 days earlier)      last day (3172 days later) »