« first day (1571 days earlier)      last day (3393 days later) » 

8:00 PM
@SebastianBergmann it's not, many times I needed some weird thing and "Oh, phpunit.xml has an entry for that"
 
@JPDelMundo do a phpinfo(); are you using share hosting or dedicated server?
 
@marcio weird thing? "unclean code" ? :P
 
Besides I want to stab people who write crappy code with global state, have to turn process isolation on and then complain test suite is running slow.
 
@BrianS phpinfo result: memory_limit 96M 96M both local and master, dedicated server
 
@SebastianBergmann Reality is that PHP is supported too shortly. It needs "long term supported" versions. At least that's my opinions for a few years. php.net pushes that off to distributors, leading to a fragmentation of offered versions (whatever fits the current distribution release cycle is picked)
 
8:04 PM
Well you want 100 at least, change it in your server setting, What OS your using? @JPDelMundo
 
@MarcelBurkhard not necessarily.
 
@johannes yes but the Go PHP 5 Initiative worked out well and Go PHP 7 might too
 
ohai @johannes
@johannes I hope that we'll at least have an extended lifecycle for PHP 5.6
 
@MarcelBurkhard and then "Go PHP 7.1" and "Go PHP 7.2"? And how many years after PHP 5.0 (ok, bad version, after 5.1) "Go PHP 5" came? PHP 7.0 will be out of support by that time already ;-)
 
user895378
 
8:07 PM
@NikiC I was always against making that too strict. Communicate an early date but take the liberty to extend if reality comes by. But php.net nowadays has an RFC demanding yearly releases, so extending a version increases the load on the way too small set of people doing maintenance ...
 
@BrianS I just want to increase the memory on a specific script, reason for ini_set
 
user895378
If you already have a small set of people doing maintenance then they're spread even thinner by supporting more releases for longer time periods though, right?
 
user895378
The logic works both ways.
 
@JPDelMundo What is your server Operating System, so tell you how
 
@rdlowrey too long, I didn't read the text. From the title and first few sentences mind the current dituation in PHP land: Distributors keep old versions of PHP and backport fixes on their own (well with some help and coordination on security@ but not much), with a lts version of PHP security issues are (hopefully) clearer assoiciated to releases in distributions and fixed
 
8:11 PM
@BrianS x86_64-redhat-linux-gnu php 5.3.15
 
user895378
Hmm ... I wonder if it would be worth maintaining a single LTS branch where non-security BC breaks are ruthlessly eliminated for a minimum time-period.
 
@rdlowrey The idea of LTS versions is to also have the "feature preview" (or whatever title you pick) releaes in between. Their support would stop as soon as the next one comes out. This means only LTS get longer support, which, depending on scheduling etc., can be less than what we have now where we have frequent releases and each is supported for a few years
 
user895378
Right, that sounds sensible.
 
@rdlowrey It is sensible. At least in my opinion. Others disagree :-D
 
I don't really get why the current three years aren't enough…
 
8:14 PM
because its never enough, a lot of people don't upgrade until they have to
 
and what would happen in distros when LTS period ends?
 
you dist-upgrade
 
@JPDelMundo change it from Global php.ini
 
@MarcelBurkhard no, distros probably just will backport from the newer versions.
 
@JPDelMundo find / -name "php.ini" -type f to fin your php.ini
 
8:16 PM
What monitor setup do you guys have? I finally got a desk big enough for multiple monitors
 
@bwoebi But you can't trust that, some CVEs get missed
 
@BrianS I know how to do that but I don't want to increase the memory limit globally, I only need the increase on this 1 script which is the reason why I'd use ini_set
 
bwoebi: The issue is complicated and bound to the multiple layers involved - there are software vendors who have limited resources for testing and therefore don't want to support too many versions but need to support all (with LTS they can only support LTS versions), it's distributors who have to provide versions, it's hosters who have to piclk versions and then there are end-users who don't care about PHP but have to navigate the matrix this creates. LTS versions make that matrix smaller.
 
@MarcelBurkhard just like you currently have to make attention that all sec fixes really landed in the sec-fixes only branch too…
 
@JPDelMundo Well check and see if you are allowed to overwrite or just use .htaccess
 
8:18 PM
@johannes issue with LTS versions IMO is that everyone then uses them and you can't really use new features/minor bugfixes until a few years later when new LTS version appears.
 
@bwoebi define "you"
many people can't use them since they have to create software which works with "what is in the market"
and that's 5.3
 
@johannes uh, not really. If you start a new project, you mostly also have 5.4 or 5.5 today.
 
if you control your environment more or don't care about "maximum reach" then you can use the intermediate versions
@bwoebi Where do you have that? - On your own server for your own fun or at your customer's site where the admin uses whatever $hosting company offers?
 
but still, distros define today what's in the market. If we then do LTS versions old PHP versions even longer are in the market.
@johannes on my own server I usually have the current or the next version… I mean most $hosting providers today have 5.4 or 5.5.
 
But we bring the field together, instead of having a version mess it is clear which generations are there and more predictable what next distributions will contain. This means I as a vendor have a safer bet when picking. Also what is bad if they run an older (supported) version? Yes some software might not run. But if they don't need it? I'd rather have properly supported older versions than unsupported versions
 
8:26 PM
@BrianS I tried htaccess didnt work. How can I determine if I can override via ini_set?
 
Are you using Apache? @JPDelMundo
 
@johannes does this make it any better? then we have the same issue after the LTS becomes unsupported…
 
@BrianS What config do I need to change so I can override via ini_set?
@BrianS yes, using apache
 
in your global apache setting search for line AllowOverride All @JPDelMundo
 
@bwoebi Again it depends on which side your coming from. But yes it makes a difference as right now the user has the trouble to update or not each year without clear guidance whether all his software will work etc. or whether a vendor is skipping the version. With LTS versions, hopefully, vendors have less excuses not to support a version and distributors a clearer pick. One year, for many, is, unfortunately, a short time ...
 
8:32 PM
@johannes one year? If I pick 5.6 today, I have more than 2 years…
 
@bwoebi you really are not a typical developer. A lot of people pay developers to develop an application and then can afford small upgrades but not big ones, which leaves them stuck either on old versions or having to through the application away. You are capable of upgrading any software you write, so you don't suffer the problem.
"If I pick 5.6 today, I have more than 2 years…" Imagine if you pay a team half a million dollars to develop an application for you. Would you be happy to throw it away after 2 years?
 
@bwoebi 5.6 is a bad example as 7 will be next ... so let's jump wildely in time ... two years ahead 7.1 is current, 7.2 is close to release. Can I pick 7.1 or will some software in my collection fail as the vendors of that wait for 7.2 for the update?
 
@Danack Yeah, you need to pay a few thousand dollars then... And distros anyway have LTS, so…
 
@BrianS I'd prefer if I set this via ini_set so htaccess is not an option for me
@BrianS What config do I need to change so I can override via ini_set?
 
@JPDelMundo i understand but for you to be able to change anything from .htaccess the server must allow it first
 
8:35 PM
I've always had the feeling that "vendors" typically support new PHP versions right away
 
@johannes Possibly related....some people seem amazed on internals that PECL extensions might want separate branches for 5.6 vs 7 support. I'm pretty sure that PHP 8 will be out before extensions can realistically drop 5.x support, so it's going to be an IFDEF hell to support all the versions at once.
 
I never had an occasion where I wanted to use a library and it didn't work because the PHP version is too new
 
library and opensource-app vendors? yeah…
 
@JPDelMundo Remember by changing AllowOverride All, your just allowing overwrite
 
@NikiC I had. Wanting to use something on seven, but library had constructs with a new meaning in 7 (uniform var syntax).
 
8:36 PM
@bwoebi No a lot more than a few thousand. Just to get someone to come in and analyze an application to figure out a ballpark of what needs changing to upgrade to a new version of PHP would cost a few thousand dollars.
 
@bwoebi lol ^^ wasn't talking about unreleased versions here ;)
 
@Danack No idea ... didn't touch much of internals lately. 10 years in there is enough and needed some distance. Too much emotional binding. :-) My SAPI (the only thing I actively ported to 7) had very few #ifdefs, about the same as between 5.3 and 5.4 or so
 
@Danack there's usually just a fixed amount of changes…
 
@johannes s/enough/too much/ - good for you.
 
@Danack With a nice compat header, maybe feasible to not branch
 
8:38 PM
@JPDelMundo here is a small server configuration info digitalocean.com/community/tutorials/…
 
@NikiC Well, there are cases where even small BC breaks suggest bigger changes to code which peopple delay .. and then there is the worl of "support contracts" and therelike
 
@johannes as long as there's not a lot of hashtable/zval handling, fine.
 
tl;dr release management is hard, better do programming :)
 
Morning best room of the network o/
 
@NikiC Possible.....I'm still thinking about it. Basically there is stuff in Imagick from 5.3 that ought to be cleaned up. Or, as we aren't really adding many new features, just leave the current branch as it is and cleanup a 7 branch......which might be better both long term and short term.
 
8:40 PM
@Danack I'm happy that I meanwhile manage not to look at my internals folder each time a new message pops up -- more than 1500 unread in there :-D
 
Yeah - that's one bad thing about gmail. 'Mark all as read' only does one page at a time.
 
I still look each time a new mail arrives ... but usually just click on it and ignore
 
@bwoebi True a SAPI has little of those "here's a script and there are the output hooks taking char*" didn't change much ;)
(just as reference github.com/johannes/pconn-sapi is the mentioned SAPI)
 
@BrianS So you mean for ini_set to work, you need AllowOverride All in the apache conf?
 
@JPDelMundo no, I'm say you need to allow it to be able to overwrite for that specific .htaccess location.
@JPDelMundo I know its server management and no one want to take security risk. but this does not effect anything on your server (only if anonymous have access to your server)
 
8:45 PM
@BrianS Well I am saying is I don't want to change this via htaccess, I want to use ini_set
 
Well ini_set is just a function, what you use inside is important @JPDelMundo
 
@BrianS Of course, the original call was ini_set('memory_limit', '100M') which doesnt work
@BrianS in my case at least, so I am not sure if there's some configuration restricting ini_set
 
@JPDelMundo ini_set is kind of self-explanatory, basically its telling the server to change the ini file for current directory. Now you have to allow it to overwrite before it can work.
 
@BrianS Where do I need to allow it?
 
In you apache Configuration File @JPDelMundo
 
8:54 PM
when will the PHP7 feature freeze period start? (timeline has no specific date)
 
@JPDelMundo in Redhat Linux is /etc/httpd/conf/httpd.conf
 
@BrianS What exact config setting in apache? I know the file
 
@marcio wiki.php.net/rfc/php7timeline .. if you trust that :-p
 
@JPDelMundo search for allowoverride
@JPDelMundo and tell me whats the statues
 
@johannes no, it doesn't state anything about feature freeze, which usually is at the end of alpha. It just states when alpha should begin and beta end… but not when alpha ends/beta starts.
 
8:57 PM
@johannes lol, thanks, I do trust it (a little bit).
 
@BrianS OK so are you saying now that allowoverride is required for php ini_set to work?
 
@JPDelMundo Yes
 
@bwoebi In the stated timeline I see "Line up any remaining RFCs that target PHP 7.0" which I consider as deadline for defining features (freezing designs) and "Finalize implementation" which I interpret as freezing implemented features ... if it's not in there I have strong doubts there is any accepted feature freeze.
 
@johannes Oh, I understood that as prepare the last RFCs and vote them on.
 
@JPDelMundo You mind if you tell what Web Application your using?
 
9:01 PM
@bwoebi I read it and assumed feature freeze starts ~Jun 15
but the RFC is quite ambiguous.
 
three people, three different interpretations :-D
 
@bwoebi yes, and when they are voted on the feature set is completed. Later RFCs go to later versions. And then there is a time where things being voted on can be implemented. ... But it's my interpretation. The fun with PHP RFCs is that you can interpret them .. and some do as it fits them :-D
 
@BrianS Are you sure about this? That AllowOverride is required to be able to use ini_set?
 
I avoided the term "feature freeze" as such on purpose ;-)
 
@bwoebi I guess all +1 votes had a different interpretation, therefore the RFC was quite successful.
 
9:03 PM
@johannes I'm sure Zeev phrased that intentionally this way :-D
@marcio hahaha
 
@JPDelMundo Thats how i do it. You can search around too. Oh and don't forget to restart Apache if you did go my way
 
@bwoebi Except for Pierre I don't imply any intentions to anybody but oversight or mistake
 
@BrianS No, AllowOverride does not have any relation to the ini_set function
 
Uggggghhh what's an easy way to find out what PHP release introduced some new opcache directive?
 
@PeeHaa git blame
 
9:07 PM
What's the quote attributed to Einstein about "Don't explain anything as bad intention when it could be stupidity"
 
hmm ... rediscovered "30 Seconds to Mars" this week
 
@JPDelMundo How can you change memory if even the server doesn't allow you? if you answer that question then i believe in your answer :)
 
@PeeHaa changelog
And Ctrl f the new directive
 
php.net/manual/en/opcache.configuration.php - that's a funny changelog ... an opcache option existing since 5.3?
 
9:09 PM
@bwoebi Yep found it when connecting news with that. ty
 
@bwoebi EVERY SINGLE TIME I see commits from this "@ pborreli" github user it says "Fixed typos"
 
@johannes And funnily it's "interned_strings_buffer" while interned strings only exist since 5.4 ^^
 
guy only fixes typos on all FOOS projects
 
sounds like somebody digging here through history should do something good with the gained knowledge and go to edit.php.net (or at least bugs.php.net ...)!
 
Yeah might as well pick it up when I double checked the (for me) new opcache directive
 
9:12 PM
@PeeHaa thank you!
 
No thank you! :P
 
A life fixing typos, nothing against it though:

https://github.com/pborreli/generator-joli-symfony/commit/ecac0096c364acb7aae6ba6edc0d3e795fad3924
https://github.com/pborreli/EntityAudit/commit/542c02ef35108eb6af5894c0db448d8e0ae793ba
https://github.com/pborreli/ClassPreloader/commit/a9a6ef9b1a6960d45481ce7fdf375177eeb7007f
https://github.com/pborreli/EasyAdminBundle/commit/c695da8734809b8baaa285ba31f2110da3a457f3
https://github.com/pborreli/jekyll/commit/d28fb07bb9e3ed07bfe049b82ed0567afb4195fd
 
> There is a global update in progress...
Annoying update window is annoying
 
@marcio easy way to have some great stats for your CV, as some do by doing the yearly copyright update on PHP :-D
 
@BrianS php_ini is for php, actually you can try using AllowOverride None and still be able to successfully use php_ini
 
9:15 PM
The totally not borderline illegal yearly copyright update.
3
 
@JPDelMundo yes, but you have to change it with .htaccess
 
@BrianS sorry I mean ini_set, not php_ini
 
@johannes :D there is an entire industry around fixing typo and it's not the framework typo3.org
 
@JPDelMundo Why you don't want to use .htaccess?
 
@BrianS OMG you dont know what you're talking about do you?
 
9:17 PM
oh, "need and meaning of copyright lines in source files" - that's a fun discussion I had with too many lawyers ... consensus: They don't really matter (as I understood it in U.S. law they were more relevant once ...)
 
@JPDelMundo you say that you want to increase your memory limit, right?
 
@BrianS Yes, via ini_set. Do you even know the difference between using ini_set and htaccess?
 
@johannes Yeah....and even when they do matter, it wouldn't make a real difference until about 75 years time. By which time I doubt anyone editing it not will care.
 
@JPDelMundo yeah to set configuration options
 
@BrianS OK so try using AllowOverride None and then use ini_set on a script, you'll believe me
 
9:23 PM
how to call phps standard function set? ext-standard isn't really accurate. "standard library" implies SPL, which is also incomplete.
 
@Rangad what is the standard function set?
 
@Danack Well, if he file was changed afterwards the copyright attribution is wrong and you can question the whole thing ... laywers are fun with such things, they do their form of hacking ... but then again I wouldn't want to start a serious debate about PHP's copyright ... I doubt all things can be properly traced back to a source etc. :-)
 
@NikiC Tbh, I just need a name for a document. Vagueness isn't wrong in this case. Likely everything within /ext.
 
@Rangad in that case standard library sounds fine
 
@Rangad There is nothing and a lot, you might say something refering to "contained in the PHP distribution" but it's not clear what is available, there are functions which might exist on one system not the other .. i.e. I think PHP for some time (not sure about current state) had the mail() function (part of ext/standard) only when the configure script detected a sendmail binary on the machine PHP was compiled on ... very random behavior
 
9:28 PM
s/lawyers are fun/'The first thing we do is this' - spectacle.org/797/finkel.html
 
I have a list of products and a shopping cart that I create by myself using symfony. The shopping cart is always shown on the right margin of the list. After adding some products, I go to the standalone product page and remove a product. If I go back to the list of products, the shopping cart still shows the removed product.
I know I could fix this not caching the web page of the product's list, BUT the products list is populated using a ajax calls, so when going back to the products list it should set vertical position when clicking on the link to the standalone product. Any way to make this? That is always updating the cart and keeping the vertical position of the products list.
 
@ziiweb "set vertical position" sounds like an HTML/JavaScript question, not PHP
 
Can one thread access the stack of another thread?
 
in what context? And with what amount of sanity?
 
9:34 PM
just theoretically
to rephrase: does the os typically protect against it?
 
so you'Re tlaking about some x86 CPU and OS thing?
:-)
 
@NikiC @johannes I guess "definitions contained in the PHP distribution" + twenty lines of annotations explaining what the PHP distribution is will do. Thanks.
 
yes
 
Yes you can. Prove: You can pass pointers to stack objects between threads.
 
k
 
9:37 PM
The CPU won't protect one thread's stack from another thread without the OS telling it to. And most OSes won't tell it to.
In fact, i don't think i've ever heard of one that does
 
If there were it would break quite some things ...
It is common enough to do something like void foo() { struct s bar; /*...*/ pthread_create(.... &bar); /... */ pthread_join(); }
 
yeah, makes sense
 
Hey, so don't want to start a "which is better" war, but I'm looking to ramp up on PHP development again. I want to pick something like symfony2 and laravel and stick with it. What do you guys suggest?
I really don't want to learn one over the other and see the industry really isn't using one. I just don't know which will be around for a while
 
@taco Learn PHP instead of random hype X
2
 
^
 
9:51 PM
@taco focus on becoming a better programming instead of random framework x
@taco and of course I'll have to suggest this
 
I'm in an environment with two dozen devs, and we're moving away from PHP. They're our legacy applications
It would make sense to put them in a framework
I can standardize our Angular apps, and people can just pick them up. With PHP, people do what they want, since it doesn't have the same structure
 
You're not moving away from PHP by using a framework. You're just adding something else to learn on top of PHP.
 
Hey @FlorianMargaine, I didn't know you hung out in here
 
@taco This is not a problem you solve by switching languages
 
9:54 PM
That's not why we switched
 
@taco no it doesn't make sense. The structure should be built around the application and not being pushed into a cookie cutter framework structure
 
Thanks for the link @cHao
 
If your programmers suck, they will write shitty code with or without a framework. But frameworks often make writing good code harder
 
hey I have local changes which are green on git status ( I already git added the files) but git push origin says "Everything up to date"
 
and skipping the learning-PHP step isn't an option unless you want to be yet another half-assed "PHP" programmer.
 
9:56 PM
So why is the focus for this discussion on the programmer
 
@taco that was @Patrick 's link
 
@MarcelBurkhard A don't know about green status thingies, but have you committed your changes?
@taco You brought it up yourself :)
 
@taco Symfony2 is less worse then Laravel
 
Laravel is not bad and laborious, but you will often find incredibly crap made on top of it (and will need to redo). Symfony is evil and bloated but you will find better code made on top of it. So pick which world you'd want :)

PS: this is based on personal experience, ones could say the opposite.
 
@PeeHaa I was sure I did but I just tried git commit -m "Not so descriptive comment" * to check and id actually commited files and *git push origin worked now, thank you! :)
 
9:57 PM
@taco because the programmer is the one responsible for writing non-shit code. a framework won't help much if they're prone to creating brokenness.
 
true
 
hey those stars in messages are greedy
 
I think you guys are right, now that I think about it. It doesn't make sense to add a framework and refactor production applications
they are going away anyways
I think I'll stick to creating tests and code coverage so we can port them
 
/me in love with PHPStorm, Git, PHPUnit, bliker/cmder
gn8
 
10:03 PM
cya @MarcelBurkhard
 
damn .. this thing already has 35 tables
 
'morning php. I'm having trouble debugging bcmath. I'm var_dumping numbers at every steps, all of the results are strings, all calculations are made using bcmath, I've ranged the bcscale from 2 to 10 but roughly one time out of 15 there will be a huge difference in the result. (ranging lower and higher). the wrong results are always the same, eg I guess the trouble must arise from the same place. I have trouble finding a tutorial/ressource on how to properly debug bcmath calculations
 
@taco you might benefit from reading M.Fowlers "Refactoring" book
 
@tereško thanks I see it in my Safari account
Publication Date: 28-JUN-1999
seems a bit old
 
^ why would that matter?
 
10:09 PM
I am not sure how to respond to this
 
@taco it stands the test of time
 
@FélixGagnon-Grenier Wouldn't you debug them the same way you debug anything else? What's special about bcmath?
Unless you're referring to a bug in the library itself
 
@PaulCrovella thats what I was looking to hear, thanks. I wasn't sure they had the latest version
 
@taco one of the books from my "must read" list is books.google.lv/books?id=zMQmAAAAMAAJ&redir_esc=y
it's from 1979th
 
10:16 PM
@PeeHaa I almost want to say "clearly you have xdebug installed, get rid of it and turn error reporting down to make the error go away"
 
:-)
 
Tell him to set $classe_body to null, that'll fix it
 
ya know, it is really annoying when frontend is made of condensed clusterfuck
 
@Andrea impressive. Unfortunately can't vote
 
10:32 PM
@NikiC I'm pretty sure my code is at fault here^^ I'm just getting out of tricks and I must say I'm not yet very familiar with the way floats and numbers are handled internally. I'll just keep up with it. thanks for your time.
 
casting … "0x0" == true, but "0" == false :s
 
Just to be sure: Only the strings "" and "0" are equivalent to null/false using loose-casting rules?
or are there other values?
 
@bwoebi Do you mean currently? If so - 3v4l.org/bLgoS
 
@Danack only strings I mean
 
@Danack Welcome to the 10k circle jerks team btw :-)
 
reaches around
thanks.
 
11:30 PM
I need to cause an E_ERROR to test things. I can't, uh, seem to make one. Any immediate ideas?
 
@Charles how about trigger_error() ?
 
the docs say it only takes E_USER_FOO, I need a real E_ERROR
 
php -r '1 + array();'
 
super, thanks
 
I'm surprised… I thought null and false have same semantics, but actually null != "0" while false == "0" hmmm…
 
11:37 PM
php
@Charles ftr, I went on lxr.php.net and searched E_ERROR to find a use case...
 
@FlorianMargaine Thanks!
okay, so... uh ... since when has error_reporting() always returned zero when inside an error handler?
something is pathologically incorrect here...
 
Looks like php7 aborts to early and skipps the shutdown function: 3v4l.org/qNlgo#vphp7@20140901
 
@Rangad because the error occurs at compile time
 
Yup, so the entire reason my custom error code has been broken this entire time is because the registered error handler did something different when !($errno & error_reporting()), and error_reporting() is always, no matter what, returning 0.
 
11:52 PM
A minimum of transitivity in loose PHP comparisons would be nice :s
 
@NikiC ah I see. Runtime version of that behaves as in php5: 3v4l.org/IKLiY
 
yes, in PHP 7 the ast is resolved as far as possible at compile time.
 

« first day (1571 days earlier)      last day (3393 days later) »