« first day (2811 days earlier)      last day (2134 days later) » 

12:05 AM
Yayyy first RFC :tada: wiki.php.net/rfc/object-comparison
 
@rtheunissen "now way"
@rtheunissen there's a formatting issue, search "documented anywhere"
 
Wes
what's the signature of the methods?
 
@rtheunissen ^
 
Wes
12:30 AM
@rtheunissen you sure you want to commit php to this, rather than creating just an extension? i am not sure that's the way to go
i would prefer a different operator for polymorphic equality
like if($a eq $b){}
why don't you do this instead phpinternalsbook.com/classes_objects/… ?
 
@Wes yeah pretty sure, feels right to me.

@FlorianMargaine thanks I'll fix that now.
 
Wes
there is also sara's magic overloading thingy
> what's the signature of the methods?
public function __compareTo(Example $other): int
this should be mixed $other
 
That's just an example showing you can typehint whatever you want.
As stated above the block.
 
Wes
feels wrong, but as long i am not forced to write "self" then it's acceptable
because obviously i want to compare maybe to an interface, not necessarily "self" class
 
You can write whatever you want, as you can with all magic methods as long as they are public and non-static (I think).
@FlorianMargaine fixed. :)
 
Wes
12:37 AM
you have a lot of stuff not covered though
$a == $b calls $a->__equals($b) right?
what if $a has no __equals defined (like, it's an integer) but $b (an object) does?
do you call $b->__equals($a) ?
imho it's a mess
but it's not your fault... it's existing php and not many options
let me know if you have any idea about that and if you want me to write my concerns on the mailing list
 
Welcome to write your ideas, concerns and questions on the mailing list. To answer them here now anyway, yes in that case it would call $b's __equals.
It's not a mess though! It's actually surprisingly intuitive and elegant imho.
There are for sure some things I can add, like what happens when you return a non-integer, or that case you just pointed out.
 
Wes
eh, kinda lol... i don't like it much. i think levi had a better idea
 
By no means the final version of the RFC.
Passing callbacks to functions like in_array etc?
 
Wes
maybe was niki
it was something like register comparators by type, so that you would have symmetry guaranteed
as left and right operands would have the same comparator function
in other word disallow $a <=> $b if $a's compareTo and $b's compareTo functions are different
which sounds nice
dunno?
 
Can totally enforce that here.
Current implementation would call $a's.
 
Wes
12:48 AM
can you try packing the thing in an extension, so that people (and i) can try it?
 
You can just check out the branch and make, just as easy.
 
Wes
yep but not as comfortable as an extension :P
 
Evening!
 
Will take a lot less time to checkout and build than for me to write an extension. That branch has tests too so you're welcome to play around with zend_operators.
 
12:51 AM
@Allenph NICE!
 
@Allenph I was downloading a steam game at 120 mbps, but going from 1 to 50 is pretty sweet
 
Wes
did i reply to the mailing list correctly or did i reply only to you rudi?
damnit
looks like i replied correctly :B
it just appeared on externals
 
1:23 AM
@Wes I think externals caches for a while.
 
@Tiffany Its fiber, so I might upgrade...but they just installed today.
 
@Allenph :O!
I'm so jealous
 
In anticipation I bought a nighthawk router, installed DDWRT and tweaked. My local is blazing.
So, it might be worth upgrading my pipe.
 
2:08 AM
@Allenph You're welcome
That's what I was trying to tell you in your dream.
 
PHP hangs on 'illegal string offset on string references with an error handler – #76534
 
\o
 
@littlepootis Rofl.
 
 
1 hour later…
3:17 AM
morning
 
3:40 AM
Morning
 
user9535105
4:05 AM
hello
 
4:18 AM
good morning
 
Night
 
4:34 AM
Hi everybody. Good morning
 
user9059272
4:59 AM
Hello All
 
user9059272
Please somebody help me
 
user9059272
0
Q: Is the text from PHP Manual misleading the developers?

SerialKisserI'm using PHP 7.2.6 on my machine. I read following sentence from the PHP Manual : Warning Writing to an out of range offset pads the string with spaces. Non-integer types are converted to integer. Illegal offset type emits E_NOTICE. Only the first character of an assigned string is used...

 
user9059272
5:54 AM
I'm not understanding why so many down votes to my question?
 
user9059272
Only because I found out the serious mistakes from the official PHP documentation!
 
user9059272
Instead of down voting my question one should correct the manual text and save the developers from getting wrong and incomplete information.
 
6:26 AM
I'm not at all interested in making any kind of changes to the PHP Manual as I've not written that wrong text in the manual. I've done my job of finding the mistakes from the manual that I come across to. I think, correcting those mistakes and making necessary changes to the PHP Manual is not my job, it should only be done by those people who have already written this wrong text and spread wrong information among the developers community. It would be the perfect punishment for such bad people who has made PHP "infamous" among other programming languages. Such bad people should be banished. — SerialKisser 2 mins ago
@SerialKisser you won't get far with that attitude
"bad people", "infamous". "punishment"… srsly??
 
user9059272
@Gordon : My question is why the authors of this text haven't written the text with due responsibility and utmost care? Why didn't they write the manual text after testing the code practically and observing the results after executing the code? Why should such people be forgiven who spreads wrong information among developers?
 
user9059272
@Gordon : It's not a book from private publication. It's the official PHP Documentation and in my opinion there should be no more carelessness in writing the manual text. Everything should be based on practical results only.
 
it's an open source community effort. it's written by people who volunteer their time. they get nothing for it.
if you are not happy with the quality of the manual, stop complaining and start contributing your time. improve it. but please stop slandering the people who have effectively written hundreds of pages of documentation for you to go through.
 
user9059272
@Gordon : But still they should always be careful about whatever text they are putting into the manual should be correct and valid because the whole world refers the text. If they can't be responsible and careful in writing or editing manual text they should refrain themselves from doing it. PHP community don't need such people who are careless and writes wrong text based on assumptions.
 
6:41 AM
@SerialKisser they are always careful. it's not like anyone puts wrong information into the manual deliberately to mislead you.
the only person that isnt responsible right now is you by refusing to improve or file a bug and by asking for these people to get punished
if it wasn't for the people contributing their time you would have no docs at all
really, you are sitting on a very high horse here.
 
6:58 AM
Good morning.
Quick question related to scope validation. I use OAuth in my project and before, I've done the validation in the controller but I feel that It should be in the service. So to sumarise where do I check the scope?
 
Good Mooooorning!
 
7:19 AM
morning
 
mornin all
Why on php.net/downloads there is nothing about rpm&deb packages or even about using docker? There are only binaries and I suppose an average man feels concerned when he get's there!
 
@brzuchal I'd assume because debs and rpms are distro specific downloads. We got an entire page on how to install these at php.net/manual/en/install.php
Regarding docker, I am not sure the images are officially maintained by the PHP group.
 
@Gordon he has a habit if blaming PHP manual: stackoverflow.com/questions/50902944/…
 
git merning! o/
 
@tereško I know. I answered that question. he didnt have the courtesy to accept it though.
 
7:32 AM
of course
if you want him to do you the favor of accepting the answer, you should at least agree with his original premise
 
but his premise is wrong
 
@Gordon Yeah I see it hidden in manual, and I think an average man or caveman deserves one entrypoint like a download page for those links
looking at other languages download page they look better IMO, Python has a list of all releases and artifacts on ly when you choose specific version, Node has some sort of platform matrix and also includes docker images, Rust has oneliner with curl to install it wherever you need
and on PHP download page you get only last releases and tarballs with source code
and there is no fucking way an average man will handle it
 
@brzuchal which makes perfect sense to me because it's about downloading php and not about running it in docker or installing it via apt or whatever.
these are the official downloads. everything else is not maintained by the php group
 
@Gordon but shouldn't it be?
 
debatable
 
7:40 AM
Looking at Python python.org/downloads you can get pkg, or other binaries directly
 
no, it shouldn't be ...
 
I think having a link to the install docs might be good enough
 
the average man then needs to google how to install it anyway
 
the average man has been learning and running php for twenty years, did something change ?
 
the mac install page directs to github.com/Homebrew/homebrew-php which is deprecated
All I wanted to point out an average man needs to click throught plenty of different pages to install PHP
 
7:44 AM
@Gordon like that would matter
 
Sure I can compile it for myself, but it's easier to use deb and brew for me
@Gordon even Ruby has "Ways of Installing Ruby" on download page
 
okay, but I want to point out that the people qualified to build and or package PHP have no problem doing so ... maintaining a deb, rpm, pkg, docker image, or any other such binary requires expertise, and time, those expertise do not necessarily exist within the internals community, leaving it to the experts is the smart thing to do ...
 
@brzuchal Like I said: I am fine with a link to the Install docs. feel free to edit it in.
 
Yes, I agree but why there cannot be some direct links and written ways of using them in user friendly way?
 
when you download php, if you can't tell by looking at the directory structure in the archive that it's an autotools package, and you don't already know how to build it just from looking at that structure, you probably shouldn't deploy any build you do eventually produce ...
 
7:48 AM
IMO this is only for advanced users/programmers
 
but why do you think they need any help ? fixing links to deprecated things, inserting links to other parts of manual, or wiki, seems reasonable ...
but I don't like the idea of an autotools tutorial in the php manual, and talking about making official binaries outside of the windows space is not reasonable ...
 
good morning
 
farouche French. sullenly unsociable or shy.
 
@JoeWatkins and it's reasonable for you to not showing average man how to install it or download binaries from download page?
 
8:06 AM
@tereško is plague, inc worth it?
 
dunno
have not played it yet (got it on this sale)
 
hmm, not sure I wanna spend money on something that looks like Pandemic with better graphics
 
morns
 
@Gordon you can always check youtube reviews
 
@rtheunissen you probably should have asked me to polish the RFC before posting it...that RFC is really hard to read.
 
9:00 AM
Opcache does not replay compile-time warnings – #76535
 
Ok one thing, one-to-one relationship in database is like user|profile .. one-to-many relationship is like post|tags .. do you know any example for many-to-many?
 
events|participants
 
ingredients/recipes
 
movies|actors
 
books|authors
companies|stakeholders
 
9:10 AM
I am sure he got it by now. :P
 
github-repositories|contributors :P
 
chatrooms|users :)
 
Yeah I got it .. thx you guys
 
Ufff... good
:D
 
9:40 AM
PHP crashes with core dump when throwing exception in error handler – #76536
 
10:04 AM
I was talking to a photographer.
I said: We want a bright-theme-image for that place.
He said: Oh, so you want a hick image.
So I guess "hick" means a light image, right? (while google says "hick" means fool)
any idea what's that word which means "bright" and sounds "hick" ?
 
Nice day
I am trying to connect php to mysql in 000webhost.com but I get message when browse the target page
This page isn’t working
yourpage.000webhostapp.com is currently unable to handle this request.
 
Surely at least somebody told you to stop using free hosts during your stay here already?
 
may be
 
Why is it that "select * from db.table WHERE column1 is not null" works but "select * from db.table WHERE column1 != null" doesn't?
 
but this for test only
 
10:18 AM
@Webdev use localhost for testing
 
at localhost it works
@PeeHaa It's suppose to do some problems with free hosting
 
I have a decimal 12,4 in MySQL for storing money value which is a price_per_day and I want to calculate the price for a number of days. Ex: price_per_day * number of days. Can PHP do this safely or is there something special that I need to do?
is using gmp necessary?
 
@someone if you have control over the DB schema, I'd suggest you work with integers and just deal in cents.
so instead of 12.4, store 1240 and work with that
 
there might be values less than a cent
 
12400 it is then :P as long as it is well defined that shouldn't be an issue
if it is really arbitrary and you can't control it, gmp may help, but I'd still try to avoid it
 
oh boy
 
@someone stuff like this
 
clippy.gif I see you are trying to work with money. Use a library instead
 
lol
@PeeHaa what do you suggest ?
 
10:38 AM
> "If I had a dime for every time I've seen someone use FLOAT to store currency, I'd have $999.997634"
hahaha
 
this looks very promising. thanks!
 
moin
 
Yo Chris
 
10:55 AM
@PeeHaa this reminds me, I had been intending to make a bcmath/gmp/fallback to pure-PHP Decimal class, I might do that today
 
I would love you even more if you can make a native impl in core :)
But fine... the userland class will do
 
@PeeHaa that would be the ultimate intention, but I want to do a userland lib mostly in order to figure out what a sane API will look like
although actually an ext might be better because then I can do operator overloading
that's one of the rare cases where operator overloading would actually bring a measurable benefit, I think
 
The only one imo
 
@PeeHaa I also like DateTime/TimeSpan, but those are the only two (and PHP's impl of that is not right)
it's done really nicely in .net though
 
Those should just be methods imo
 
11:04 AM
it's fine when the types have guaranteed by-val semantics
var then = DateTime.Now + TimeSpan.fromHours(1); reads nicely
ffs
 
:P
 
TimeSpan diff = then - DateTime.Now; < also nice
and if (DateTime.Now < then)
etc
@PeeHaa my opinion is that operator overloads that attempt to relate a decimal to a float should throw, any objection?
decimal - int etc is obviously safe
 
@DaveRandom I am agree
Not much else you can do
 
11:29 AM
@PeeHaa you are agree? nice to meet you agree!
 
sooo.. everyone wants to be agree?
 
@Naruto I am agree too
@Tiffany Most of those are @PeeHaa
 
funny enough, he wasn't the first person to say it in chat, this guy was chat.stackoverflow.com/transcript/11?m=514015#514015
@mega6382 you have to go back a few pages to find it :P
 
11:46 AM
Can I connect mysql with php in free webhost without problems?
 
@PeeHaa moneyphp deals with cents but the payment gateway takes dollars so I can do number_format(( (int)$money->getAmount() /100), 2, '.', ' ') for the final value right or is there something that I need to be aware of? PHP scares me sometimes.
 
@someone the library seems to have solutions for that. did you check this?
 
@Webdev depends on the webhost... first, if they offer MySQL on your instance, second, they have the PDO/MySQL extension installed on your instance, third, they haven't altered the PHP installation or INI file to prevent connecting PHP to MySQL
 
Hi! how can I do somethig like this
https://slicejack.com/responsive-location-map-javascript/
I want to locate a place on responsive display in html page
The download given on the page has viruses..
@Tiffany
can you help
 
12:02 PM
@azamkhan don't ping random people please
 
@pmmaga yeah that's great!
 
@PeeHaa random people?
 
You know what, I don't like talking to uber drivers. Why do they always have to force a conversation on you?
 
@mega6382 trying to get a bigger tip, maybe
 
@azamkhan yes. Random people
 
12:03 PM
or they're bored and want to be sociable
 
I think I do talk to tiffany here
 
@PeeHaa Hi, I'm lonely.
 
so she is not a random person..
 
@azamkhan when?
 
:o
 
12:04 PM
lol
 
Morning!
 
Good evening everybody..
 
you've randomly pinged me twice without reason
 
@Tiffany dreams just got crushed :D
 
12:05 PM
@Tiffany Yeah, I guess this could be it.
 
okay.. I don't come here without a reason until I am stuck.. hhhh
 
@azamkhan nothing in this sentence made any sense.
 
Call the fire department
 
lol
 
Okay.. answer my question will be much better ...
 
12:06 PM
And we don't come here without a reason either. The reason is just not dropping everything and helping azam right away whenever he (m/f) is stuck
If you have a question feel free to ask. But don't go pinging random people just because you need help
If somebody is here and wants to help they will
 
woha... @peehaa
 
I'm lonely and Peehaa ignored me. Unwelcoming.
 
:P
 
@peehaa who the f.... are you to talk like this
 
@littlepootis Stopbeing so inappropiate
 
12:08 PM
I can't help it
 
:)
 
@azamkhan OK, thats it. You are being unnecessarily rude for no reason. He is only trying to tell you how we behave here.
 
@azamkhan he's a room owner
 
I already kicked it
 
12:10 PM
it's not like you were mean to him when you said that, it could be taken abrasive/hostile, but he was being rude by expecting us to help him
so abrasive/hostile statements were reasonable
imo anyway
 
@Tiffany He wasn't being rude by expecting us to help him, people often come here expecting help. But he was being rude by forcing his question on strangers through random pinging. And when he was called out on it he made excuses, and then when he was given guidance as to what the rules are he straight out blatantly started attacking. So, if @PeeHaa was a bit strict with his statement, it was completely fair.
 
@Tiffany I don't even feel like it was abrasive or hostile
You would think most of the mails I send out would be hostile too I guess :P
Or as some clients like to call them "to the point" :D
 
hey
 
ho
 
ha
 
12:17 PM
do you guys know way to extract custom php function in wordpress.what i want is get all lines with ___() function.we can extract and build .pot files but we have custom translation function
 
@PeeHaa yeah, that's the word I meant to use... blunt
@FastSnail regex and sed, I think. Don't ask me how though, I'm still learning it.
finally started reading my regex book
 
@FastSnail Quick en dirty: use grep more sane and probably better results use something like github.com/nikic/PHP-Parser
 
I seen a code like this somewhere:
do	{

    // some assignments

} while (false);
Isn't the whole do {} while () redundant?
 
@Tiffany hi... hi Tiffany. ( ͡° ͜ʖ ͡°)
 
12:19 PM
@Tiffany isn't it possible to use i18n\makepot.php for custom function ?
 
make pot
That name :P
 
@Tiffany please more details on first and second points
 
pots, pans...
 
@mega6382 I suppose, but even with an expectation of receiving help, I believe you have to be willing to accept the disappointment gracefully that no one can help or are just as clueless as you are.
 
I'd gracefully accept that everyone's as clueless as I am.
 
12:21 PM
@Webdev ask your web host if they install PHP and MySQL for their hosted instances, and if the MySQL and PDO extensions are included in the PHP installation
 
I know I am at least as clueless as mr. inappropriate
 
@littlepootis #NOTREADYTOHELP
 
@Tiffany Can I know that from documentation
 
Stalker
 
12:22 PM
@Webdev possibly, but probably not. You'll likely need to contact them to find it out.
or, one way of checking, create a php file on your server, include <?php phpinfo(); in the file, save it, and open the web page in your browser
 
what do you mean by the word instance ?
 
@Shafizadeh It is
 
@littlepootis ok thx
 
But I'd suggest git blaming and confronting the person who's written that code.
 
thanks guys.iwill try grep and parsers.but i just open makepot.php and found this.i think i can insert my custom function here.

var $rules = array(
'_' => array( 'string' ),
'__' => array( 'string' ),
'_e' => array( 'string' ),
'_c' => array( 'string' ),
'_n' => array( 'singular', 'plural' ),
........
);
 
12:25 PM
@Shafizadeh Are there any break; statements inside the do { } block?
 
@Webdev where your web site is hosted upon, usually a virtual machine, like shared hosting
 
It's like a forward goto when the language doesn't have one.
 
I might be using the wrong word though, after googling for a formal definition
 
btw are there any plans for PHP to have something like "hello world".superCoolFunctionCall() I remember seeing it suggested years ago.
 
Really I upload my site on 000webhost.com so you may have idea
 
12:27 PM
@Tiffany Yeah, you are exactly right, because this is not the mainsite, and even on mainsite you are not guaranteed help.
 
@someone Nikita has an extension for that iirc
 
@Webdev I really don't. I've only used bluehost as a web host provider. My employer self-hosts our website, so I have control over the web servers/VMs and what's installed on them.
 
Yeah but why would anyone object to adding it in php core?
it would be a great opportunity to clean the API
 
@someone It might one day
But it needs more thought
 
12:28 PM
@someone maybe start an RFC for it :D
but... that is a lot of work
 
Someone like Nikic would have a much higher chance of getting it accepted
:)
 
@someone Yeah, but in php it will mostly likely concatenate the output of superCoolFunctionCall() with the "hello world"
So, I gues you meant to say "hello world"->superCoolFunctionCall() ?
 
yeah I forgot about the weird -> thing
 
never go full javascript
 
12:32 PM
Yeah, but instead of this, I would much more prefer, that we have some classes to mimic this behavior.
 
@littlepootis Oh right, there is .. that's why they use a loop. thx
 
informations there
 
@mega6382 how do you mean?
we can do stuff like "hello world"->startsWith('hello')
which is pretty cool
 
This site can’t be reached
hadiandroid.000webhostapp.com’s server IP address could not be found.
Try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN
 
I can see it
!
 
12:34 PM
shrug
 
Windows is broken
 
@littlepootis or region-related, or it's blocked in our firewall
 
@littlepootis means ....
 
It means two things: 1) It works 2) You need a better hosting platform
 
Unpatched WordPress Flaw Gives Attackers Full Control Over Your Site and Execute Arbitrary Code. It Affects All #WordPress Versions, Including the Latest 4.9.6 — by @unix_root https://thehackernews.com/2018/06/wordpress-hacking.html Researchers Disclosed Details 7 Months After WordPress Team Fails to Patch It.
4
 
12:39 PM
@ircmaxell read-only filesystems are the future
 
I hate wordpress. the worst thing that happened to PHP.
 
Is this code should work in the server <?php
$db_name ='dbname';
$user_name='root';
$password='';
$server_name='localhost';
$con= mysqli_connect($server_name,$user_name,$password,$db_name);

if(!$con)
{
echo 'Connection Error..'.mysql_connect_error();
}
else
{
echo "<h3>Database Connection successfull </h3>";
}
?>
 
@Webdev Run it and see.
 
@jjok On localhost it works in 000webhost doesn't
 
mysql_connect_error()?
 
12:49 PM
@Webdev Is the database set up on the same server with the same credentials and database name on the other server?
 
No
so I changed variables
 
@Webdev If code works on one server but not another, the problem is with the server.
What's the error message?
 
This page isn’t working
hadiandroid.000webhostapp.com is currently unable to handle this request.
HTTP ERROR 500
 
@ircmaxell hmmm.. if I understood that correctly, shouldn't unlink actually sanitize the input?
 
it's the code before that. it's taking the path to delete from user input rather than from its internal object
 

« first day (2811 days earlier)      last day (2134 days later) »