« first day (1595 days earlier)      last day (3344 days later) » 

12:00 AM
hey @beberlei would you like to have a graph so we can quick read if the rfcs are passing:
I can send the PR :3
(still don't know if the graph should stay before or after each label)
 
oo, looks nice
I like post-label
 
k, I'll send with the post label
 
@marcio Can you put a little vertical divider on the bar to indicate 50%+1 and 2/3 marks?
 
Yes please!
 
@crypticツ Oh, great idea. Not sure if we have the info about 2/3 requirement but I'll try.
 
12:16 AM
I'm always having to calculate the 2/3, and I don't even know math. =o(
 
2/3 is a PITA ... I need to go out now but will do it later :P see ya
 
Hey, zeev posted his rules ;-)
 
Hmm, I keep reading "coercive something"
 
@marcio I just PRed something like this. :-D
i.imgur.com/6kRncnU.png < But it's really hacky.
 
12:34 AM
@ircmaxell I've been geeking out about that all day
Even tried to be proactive: github.com/grpc/grpc/issues/851
;)
And with this gRPC release came a new version of Protobuf, which looks awesome! groups.google.com/d/msg/protobuf/ZRpcfmeGK6s/rQZHROaskRMJ
 
@NikiC I think I'm really confusing myself now. lxr.php.net/xref/PHP_TRUNK/Zend/zend_ast.c#406 It destroys all of the children, but not the node itself?
 
@Rican7 yeah, it's definitely quite interesting
 
yea, I can't wait to see it evolve
 
Niki told me not to use free
also, when I use free, I get a zend_mm_heap corruption :)
 
yes, because arena
 
@bwoebi This should give you an idea of what I'm trying to do: gist.github.com/lt/db54070aaa7b89a448f6
 
@Leigh eih, if you want to NULL the ast, you need an additional level of indirection…
 
Not sure I follow...
 
1:06 AM
Well, you change the passed value… not the adress
 
I thought i had a pointer to the structure with *ast
oh right, derp, yes
I made the structure (well, probably first 64 bits) null, rather than the pointer to the structure
 
^ that'd probably be a compiler warning?
 
nope, I don't get any warnings
So, if I make it ast_walk(zend_ast **ast), call it with &ast then have a local zend_ast *ast_val = *ast, I can null that?
 
eih… you do ast = NULL; … you need to *ast = NULL; and that will emit a warning, no?
@Leigh you need to null *ast, not ast_val…
 
yea. that's not a warning, that's a flat error :)
 
1:11 AM
that's fine too
 
Right, I see a bunch of funcs with **ast_ptr, I'll look at those. Thanks for your help :)
 
1:24 AM
Live RFC vote stream php-rfc-watch.beberlei.de
 
There's fashionably late, then there's that :)
 
:/
 
/me pets
@bwoebi thanks, got it working, owe you a beer
 
nice :-)
 
Also discovered zend_ast_apply in the process, my beautiful tree walker was useless in the end :(
 
2:00 AM
Right, I think I've done enough on this for tonight. Can now add (via extension) custom declare() options, allow existing ones to take different values, or override whatever is set.
So my strict extension will be able to accept declare(strict_types = 1 | STRICT_WHATEVER)
and then remove the extra values before letting the compiler proper kick in
Allows me to (for example), not have declare as the first item in a file, and apply strict to everything loaded via an autoloader
 
2:15 AM
ping @ircmaxell news.php.net/php.internals/83940 mwop's experience with STH - I'm not sure if he's saying he found a bug, or whether he was just surprised by float to int behaviour.
 
I took it as the latter
 
He described it as "lossily," which is discombobulating.
 
> and to
opt-in to that [using declare(strict_types=1)] means changes to every file in my library — which is a much
larger migration problem.
@Danack ^ hmm not sure what I should think about this…
 
2:33 AM
I don't get it...if you're modifying files to have scalar type hints in the function signatures, that's a bigger burden than adding it to the top of each file...
 
yea… me neither
 
Also: "Additionally, it poses potential problems in terms of different testing results based on which mode you run in" wat.
 
2:46 AM
@kelunik k, I hacked this quick after dinner but I hate CSS :@
 
/me adds no-vote (not really)
 
@bwoebi no pressure to vote the right way. ;-)
 
Thaaaat's a good question what the right way is.
 
@kelunik wrong screen shot, this one:
 
:-D
 
2:49 AM
but yours is ok, what are the yellow things?
 
@marcio in case there are three options…
 
sometimes we have 4 options, isn't it better just to sum the "yes"?
 
yeah, no idea
 
@bwoebi plan is to vote wiki.php.net/rfc on Monday, maybe you'd like to check the thing out and see if any detail could bork it.
Going out again. Bye.
 
@marcio you mean context sensitive lexer? do it on Sunday please
 
3:21 AM
@bwoebi yes, CSLexer, my mistake. Sunday is fine for me.
 
=)
 
@Jack thanks I fixed it now :D
 
@Danack I was really bored: github.com/Ocramius/Finalizer
 
Image - prntscr.com/6acbp6 That was my attempt at making this code jsfiddle.net/ajw7n4q6/1 display more numbers from right and left side. Right now it only displays 1 adjacent number, I want to make it display about 5 more, any inputs are appreciated. (I'm bad at PHP, super newbie(not the good kind of super newbie))
 
3:39 AM
github.com/Ocramius/Finalizer/blob/… I hate these iterators… code which uses them just sucks to read…
 
Didn't want to have separate APIs for fetching data and iterating
@bwoebi I just did it that way for the sake of training :P
Didn't want to have separate APIs for fetching data and iterating
@bwoebi I just did it that way for the sake of training :P
aaaand wifi is dead again -.-
 
@Ocramius Also… what do you need that for?
 
See README?
It's not for me, it's for my clients: I jump in, I run the tool, I give them a report and I tell them to fix it.
 
Don't mark your classes as final… It's about giving the possibility to break encapsulation to the people who know what they do (reflection sucks)
 
@bwoebi read the linked article then.
 
3:45 AM
I just read it.
That's why I came here.
 
the entire article on my blog?
 
yes.
 
because what you just said is what I believe to be the uttermost bullcrap about inheritance (allowing encapsulation breakage for the sake of it)
and yes, reflection is better than that
at least it screams "BLOOD!"
 
The point is not in marking classes final… but in not extending every shit.
 
The point is in making classes final :P
and thinking about changing that before extending
no final -> no thinking blockage
 
3:47 AM
thinking blockage? in what way?
 
anyway, you can read the comments, I already had this discussion before
 
@Ocramius I see.
 
The point is that putting final in place forces consumers and authors to re-think about what they are doing when they are thinking of inheritance. Most people use inheritance to solve problems, whereas inheritance was meant to design problems and abstract them in a way that reflects the real world (and that's really rare, tbh)
Extending for technical decision reasons indicates that there is a larger design issue, IMO
 
Just to say: If you want to inherit something: first think whether you're better off without inheritance. And then, if extending is really the way to go, it's good to have some things not final.
 
Right
You can always remove final i you really need to
Anyway, nite :P
 
3:53 AM
… If they're files from my own lib, no issues…
If I don't own these files… no chance.
@Ocramius night.
 
The TL;DR is very clear about when you cannot use final ;-)
if that's true, you don't care about a third party implementation, because you already have a matching third party contract
 
Actually… the tl;dr I can agree with… but I never would extend these classes (which just implement an interface) anyway…
final is superfluous… It's just a hint "I don't think it'd be a good idea to extend that" … but we have some common sense which prevents us from extending these classes I hope…
 
"we have some common sense" - after more than a decade of development, I don't believe that to be true at all
 
(which some people lack… but yeah…)
 
Same goes for road signs and speed limits, fyi ;-)
There's no physical limit to the speed of your car: it's just a notice that you have to follow, because people's common sense is non-existing :P
 
3:59 AM
@Ocramius yeah, there are always people who can't respect them, but well…
 
Yes, I'm saying that in a world without road signs it would be chaos
 
sure?
 
Pretty sure, yeah
 
I believe to have read some article where all road signs were removed for a few days from a city or so
 
Not everyone drives the same road every day :P even the careful ones wouldn't know what's ahead on a new road
really off now XD
 
4:02 AM
night ;-D
 
4:26 AM
https://wiki.php.net/rfc/allow_url_include

oO … I'd be okay with removing allow_url_include and always allow local streams… but `include $path, $type;` … huh wat?!
 
zan
5:04 AM
Good Morning folks
I am scared of clicking any link today as it might redirect to rebecca.blackfriday lol
 
5:48 AM
Morning
That Scalar rfc is really exciting
and happy friday everyone
 
mornin'
 
@bwoebi bugs.php.net/bug.php?id=69124&edit=1 Looks like you touched this code last
Don't really understand the do { } while (0) either :p
 
reddit got fancy skin in /r/php
 
morning joe
 
moin
 
6:13 AM
@bwoebi sorry, you touching it was the fix. I'm tired. Off to bed
 
hi
i need to create a separate folder for each user
to store specific images
is it better to use the username as the foldername
or md5(uniqid($dealername,true));
the string generated is unique
but a long one
please advice
someone there?
 
6:33 AM
@crypticツ You trolled @tereško meta.stackoverflow.com/questions/286896/… :D
 
6:43 AM
@techno - username or userId is just fine
 
6:59 AM
@Rikesh i'm just popular
 
@tereško - Indeed you are ;)
You're highly technical terms misunderstood as "rude" I assume :p
 
@tereško I guess... congrats are in order o.O ?
 
?
 
web.whatsapp.com works on firefox now
 
7:19 AM
knock knock! anyone there?
 
7:30 AM
@CSᵠ what were you trying to congratulate me for ?
 
@tereško the popularity :P
 
oh, right
 
it had to pay off at some point
 
posted on February 27, 2015 by kbironneau

/* by Younes A */

 
There seems to be a (not so?) subtle change in PHP 5.6.6 that breaks a test in PHPUnit's own test suite: github.com/sebastianbergmann/phpunit/issues/1630
 
In case somebody here has an idea (the PHPUnit test in question deals with exceptions and exception codes), please comment on the ticket. Thanks!
 
yeah, feeds is wrong. again.
 
@SebastianBergmann do you have a link to the failed tests? it's easier to work with...
I mean the code
 
@SebastianBergmann could it be somehow related to this:
Trailing chars in #PHP numeric strings: 4.x: allowed 5.0: not allowed 5.x: allowed 7.0 with Zeev's RFC: not allowed Make your mind up! 😠
 
@tereško no
 
7:37 AM
just making a blind guess
 
it's just something in Zeev's RFC
actually, it was.
 
/me goes back to work
 
hi
 
today my video card should be arriving =)
 
7:40 AM
ty
@SebastianBergmann tbh I'd send this to internals ML
it's quite serious if it's a BC break between 5.6.5 and 5.6.6...
especially if it's non-obvious :/
 
If will, of course, bring this to internals@ once I have more information.
Minimal, reproducing test case and all.
 
it's quite minimal if you want my opinion.
 
No, it's not. It involves PHPUnit and tens of thousands of lines of code :)
 
ah.
class Issue244ExceptionIntCode extends Exception
{
    public function __construct()
    {
        $this->code = 123;
    }
}

    /**
     * @expectedException Issue244ExceptionIntCode
     * @expectedExceptionCode 123String
     */
    public function testFailsTooIfExceptionCodeIsANumber()
    {
        throw new Issue244ExceptionIntCode;
    }
uuuh... shouldn't it be @expectedExceptionCode 123?
I may be misunderstanding how phpunit works there
class Foo extends Exception { public function __construct () { $this->code = 123; } }
try { throw new Foo(); }
catch ($e) { assert($e->code === 23); }
@SebastianBergmann this should be a minimal test case ^
 
IIRC this is a test for the unhappy path of incorrect "arguments" used with @expectedExceptionCode
@FlorianMargaine Thanks, will look into that soon.
Today seems to be my lucky day: everywhere I look I find bugs.
 
7:54 AM
@SebastianBergmann I don't have a php-src source tree around... can't help you more, sorry
phpcbf automatically fixes the source to a coding standard?
didn't know it...
 
phpcbf is an additional tool added in PHP_CodeSniffer 2. For a lot of sniffs it can automatically fix the violations.
 
pretty cool
 
Jes
Hello
Good Noon
Trying to implement url redirection in php...
my question is
if a user is trying to access a specific page, i m redirecting the user to login page if he is not logged in. and the question is how to redirect him to the same page after login. i mean the page he wanted to access.
 
8:10 AM
nice
and I forgot about 3v4l.org...
 
Jes
Could you suggest me pls
 
@SebastianBergmann actually, it throws on php 5.6.5 too 3v4l.org/cCrGu
maybe your 5.6.5 is borked?
 
b6e14b44 (Zeev Suraski       2004-02-10 16:08:01 +0000 765)     zend_declare_property_long(default_exception_ce, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED TSRMLS_CC);
lynch him
/me grabs pitchfork
 
@FlorianMargaine I built PHP 5.6.5 fresh from a tarball for this
 
commit b6e14b44b4d55dad9e71a2a915760eef22b8762c
Author: Zeev Suraski <zeev@php.net>
Date:   Tue Feb 10 16:08:01 2004 +0000

    Fix bug #27186
that doesn't look right ...
is protected in 5.6.5
 
8:18 AM
@SebastianBergmann weird.... 5.6.5 has the same error everywhere, not just in 5.6.6/5.6.5 :/
 
Only difference is that my PHP 5.6.5 is a debug build and PHP 5.6.6 is a release build. Building PHP 5.6.5 as release now.
 
@Jes you can save the page the user tried to get the first time in url
so you'll have like mysite.com/login?return_url=<previous_page>
 
Jes
@iroegbu thanks for ur help..
so do i save the url everytime before navigating to login page
 
/me goes back to bed
 
Jes
i m using elgg.. is there any default func
 
8:23 AM
@SebastianBergmann weird...
 
@Jes I don't know if there's a default way to do it in elgg
 
Jes
ok.. now i m directing them to login page..
how would i get the url that they accessed ?
 
that shouldn't be difficult... at the point of redirecting just change whatever/login to whatever/login?return_url=<previous_page>
 
Jes
@iroegbu thanks.. let me try
 
@iroegbu then you need to store <previous_page> in the login form
 
8:32 AM
it will be in url
 
in which url?
 
at point when login form is displayed
 
^^,
 
then you won't have it available when submitting the login form
 
yes... he has to pass it with login information
 
Jes
8:35 AM
storing the prev url in session and then redirecting them after login..
will this work
 
usually your anonymous users don't have a session
 
Jes
@FlorianMargaine then what is the better option
 
@marcio I hate it if pings aren't displayed here, just in SO notifications.
 
@SebastianBergmann it works in release?
 
10
Q: Redirecting to previous page after login? PHP

Alejandra UzelacI've been searching for a solution but it's seem I can't get it right, no matter what I try. After successful login, the user should be redirected to the page he came from, let's say he's been browsing a post and wants to log in so he can leave a comment, so he should be redirected to the post...

 
8:51 AM
Hello
I am having stupid problem
have been working with laravel long time, more than year probably
and now cannot make route to work
(facepalm)
here is the routes.php
it works
but lets say I go to localhost:8080/laravel-test/public/user - it does not work, shows 404 not found :(
how can this be?
how could I narrow down the problme
problem*
 
when everything works: LaraWell. When broken: LaraNotSoWell
6
 
@Gordon :-)
 
:)
 
And on that bombshell, off to work: I feel less depressed now, thanks @Gordon! :P
 
so when it says not found - it could show some log how it tried to search
 
8:55 AM
LaraNotSoWell Lolz :p
 
becuase everything is written in routes.php
 
@SebastianBergmann - Does this supports by phpunit stackoverflow.com/questions/28760534/… @expectedException?
 
@Darius.V and /public/user/ ? (notice the trailing slash)
 
no
the laravel-test is the folder
 
8:59 AM
where the applicatin lies
so the first url works - localhost:8080/laravel-test/public
@FLorian - no this does not work
 
then bug taylor
 
oh trailing slash
checked slash - it is at the end
does not work
hard to imagine that its a bug, is so many times tested
 
@FlorianMargaine At this point I don't know anymore what worked when and how.
But now we know (hopefully) that the cause is in Xdebug.
 
@SebastianBergmann heh. Saw the email threads, yeah
 
tried even Route::controller('user', 'HomeController'); - still does not work (knowing that with root route home controller works)
can it be that nginx is doing something wrong and not the laravel?
 
9:12 AM
@Darius.V are the routes written in the correct order?
 
I tried commenting out every route
and and then left alone root route
then adding one route
Route::get('user', function() {


return 'test';

});
before root route
it should work I think
so order should be correct
also tried echo '}aas'; after user route
so user route is just skipped
in routes.php
I would like to find how the Route::get method works
but I dont know where it is in laravel
ok found this method
it is in Illuminate\Routing\Router.php
and it does not get even called when I go to user url
 
@Darius.V - Keep it up :)
 
but when I go to root url, it gets called
actually even routes.php is not called now I found out
so how I am expecting that route will work if routes.php is not called
damn - not even index.php is called
tried to die in index.php
how is that possible?
 
hi
 
9:22 AM
@Darius.V Cross check with .htaccess
 
I never touch htaccess usually from what I remember
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
it is such in public folder
 
It was working before with this htaccess in your local?
 
actually now I don't kwow. Because past weeks I was mostly working from command line - trying to learn phpunit
and this was my testing project
btw I moved this project from other directory
in other directory I know those routes worked
but it should not depend on where the project is
 
/app/config/app.php make sure url is set here 'url' =>
 
@Rikesh - but the thing is - it will not reach app.php if it does not even reach index.php
first thing is that my die function should get called in index.php
 
9:25 AM
 
yea. But when I run another url then it is not working
so on other urls - index.php is not executed as I understand
 
strange
 
yea, so not point in thinking about other files, because everyting starts in index.php at firsts
 
still 404
 
9:28 AM
RewriteBase /laravel-test/public/
try adding ^^ in htaccess
 
ok, in any line in ifModule tag?
<IfModule mod_rewrite.c>

RewriteBase /laravel-test/public/


Options -MultiViews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
no efffect
btw isn't htaccess only used for apache?
 
After line RewriteEngine On
 
ok
did not help
 
oh, joy .. laravels
 
9:38 AM
I set nginx error log
and run the page
then opened the log - there is empty
file
kind of thinking just start net laravel project
but would be better to understand how it works and why
 
Can I ask wordpress/php questions here?
 
I think yes, because it is php
tried to create new laravel projec, without doing anything, just extracting
so it is in laravel-master folder
and it shows no error, just blank page
but it should show some welcome page
 
Well, I want to have a default selected <option> in specific page. Any idea how can I do that in functions.php?
 
@user1441816 - its not about just wordpress
<select>
<option value="volvo">Volvo</option>
<option value="saab" selected>Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
just add selected attribute
for example in this case - saab is selected by default
 
ThW
Morning
 
9:53 AM
Yup. I want to control it via php because the option values are URLs. so it directs to specific pages. and the default selected option remains the same.
 
probably you should post some code, I dont get the question
 
Hi guys. Just a question. e... What url do you recommend for admin page? /admin OR /login OR /sdfjaskdfjk234234 OR ... ?
 
/dsjkjfd123 sounds pretty good
 
<select name="sort-properties" id="sort-properties">
<option value="/page-1/" selected><?php _e('PAGE 1','framework');?></option>
<option value="/page-2/" ><?php _e('PAGE 2','framework');?></option>
<option value="/page-3/" ><?php _e('PAGE 3','framework');?></option>
</select>

Something like:
if page 2 = option 2 selected
if page 3 = option 3 selected
 
@FlorianMargaine Really?
 
9:59 AM
@user3002233 of course not
 
Why wouldn't you use /admin?
 
@user3002233 I sugest /asdasd12312 for security purpose.
But not exactly random... maybe "/cool-admin"
 
@user1441816 if you want security, move the administration access to separate vhost with IP based access limitation
 
I myself know how to secure it! I mean, a random url. and a cookie for accessing the page. But i want to know what do the others do. Like google. or fb. (oh)
 
Tbh it's up to your ACL or other security mechanism to decide whether or not you can access /admin. Get that right and you can have as many 'secure' pages as you want
@Danack Hey man, have you done your slides for phpsc? Can I be your proof-reader (may learn something at the same time) :-)
 
10:06 AM
@tereško - I guess it will be difficult to host admin to separate host in case of WordPress
 
oh .. wordpress
 
@tereško It seems reasonable.
 
moin
 
Morning
 
@Jimbo Just searched ACL.
 
10:10 AM
@DaveRandom moin moin
 
ok, when fixing the phpunit issues with the coercive scalar type hints, then for Doctrine DBAL 8 tests fail because of E_DEPRECATED. testing moar stuff now
 
10:45 AM
Hai I am new to Laravel framework
can anyone please help me on stackoverflow.com/questions/28762788/…
 
@NithilGeorge try this chat instead: laravel.io/chat
 

« first day (1595 days earlier)      last day (3344 days later) »