« first day (3632 days earlier)      last day (1541 days later) » 
00:00 - 19:0019:00 - 00:00

00:06
@Girgias niiice 🙂 and thanks for taking care of the warnings!
At this point refactoring stuff is easier
00:47
I want to make sure I understand something currently (and too lazy to drag my chair to my primary desktop where I can test it myself), if a function call resides in an if condition, will the function call execute? e.g. if (!file_put_contents($filename, $data)) throw new \Exception("lol no");
(... In the time it took me to write that on my phone I could've probably tested it myself ... I'm a dunce)
^ answered my question
01:24
It must because otherwise you cannot evaluate the if condition
Ah didn't see the last message :')
 
6 hours later…
07:52
php 8 to other versions ・ Documentation problem ・ #80146
08:04
Till this ticket is not closed, can anyone please help me to solve this issue.

https://stackoverflow.com/questions/64021936/how-to-handle-error-checking-in-phpexcel-code
08:29
morns
Hello, I'm trying to test litespeed and I compiled php 7.2 `--with-litespeed` option and I'm using the lsphp binary using the command

lsphp -b *:8000

When I access my static file, it abruptly stops with the message:

[0] packetLen < 0.

Any idea why this could happen? The same works correctly as expected with `php -S localhost:8000`
09:16
BINARY strings may not be properly zero-terminated ・ ODBC related ・ #80147
@JAamish goto litespeed authors, we don't support 3rd party sapis, just host/distribute them
ctype_* functions silently return false for unsupported types ・ Unknown/Other Function ・ #80148
cmb
cmb
09:41
@Jeeves consider to fix this for PHP 8.
09:51
@cmb I have already wanted to do so but it didn't work out well, since ctype functions rely on strict argument handling so there were some weird test failures as far as I remember.
@MateKocsis doesn't look too bad...
I think just accepting a string is feasible from a BC perspective, but we'd have to mention that one on internals...
The current behavior difference for integers regularly surprises people
cmb
cmb
yes, really confusing, but we may need to deprecated first, like wiki.php.net/rfc/…
0
Q: How to handle Error Checking in PHPExcel code

Muthusamy the number in cell is formatted as text or proceed by an apostrophe But by using getNumberFormat i changed that format to number, u can see that in image. I don't want to show that icon in Excel sheet, Is it possible to handle that in Code itself. Using PHPExcel version 2.1 Can anyone please sug...

Please any one help me for this ticket
asking for past two days
Can anyone please reply it.
@Muthusamy yeah we noticed. If you are a programmer yourself you could have spent those two days finding the problem in the PHPExcel code yourself
@Sara I have two attribute changes I want to land: externals.io/message/111914 and externals.io/message/111915 Any thoughts on that? I think the latter one is important, and that one is also ABI breaking, so needs to go in soon.
@Crell I'm ok with $mysql as well. I left a couple more bikeshed comment ... sorry about that :P
@cmb That's a good point. It's really the same issue...
10:14
@NikiC thanks for both prs, looked over them and +1 feom me
10:53
How do I get more info on why (php-src) compilation failed? It's basically just saying compilation terminated and make: *** [Makefile:741: ext/fileinfo/libmagic/apprentice.lo] Error 1...
@makadev scroll up ^^
There will be an error message somewhere
cc: fatal error: Getötet signal terminated program cc1 (meaning cc1 got SIGKILL?) and above that is the command, thats all
@makadev Looks like your compiler bugged out ^^
Try rerunning make?
@NikiC Maybe we can also revisit the syntax for Attributes? ;-)
11:08
@Derick I know. The #[] is terrible, are we sure we're okay with it?
3
@NikiC ye, I'm getting the same problem in parallel builds and reruns, it dies on that line. But I'm running compilation inside a docker container, so if the compiler bugged it's more likely a problem with the container / docker engine
I'll rebuild the container and check it again :<
11:24
@cmb Thanks for the idea. I'll add this to the list of deprecations targeted for PHP 8.1. cc @NikiC
11:47
@NikiC after cleanup and rebuilding the container everything works as expected... docker for mac seems to be more buggy than what I expected
Attributes: the Electric Boogaloo
so..phpunit used to be all-in on doc block annotations for all sorts of stuff, like defining when an exception is expected etc, but then that's deprecated in favour of using a regular old method... with annotations, is that gonna flip flop back?
@Tiffany the electric boogaloo is how I describe people driving here. particularly when they use hazard lights (i.e. both sets of indicators/blinkers) on at once, to cross straight over an intersection. "I want to go left, I use left signal. I want to go right, I use right signal. I want to go straight, I use both signals and do the electric boogaloo across the intersection"
12:37
Hi @Sjon , Thanks for the reply.
Actually , i tried my best , I haven't get a required output, that's why i asked in this group.
Anyhow Let me try once again, Thanks
if make clean, doesn't clean Zend/zend_language_scanner.l:323 is there a command for specifically cleaning/rebuilding that?
12:55
Mutually included files ・ Documentation problem ・ #80149
> but the require_once in b.php does not re-include a.php. But that behavior is not explicitly stated in the relevant documentation pages:
"The require_once statement is identical to require except PHP will check if the file has already been included, and if so, not include (require) it again."
Sep 17 at 18:20, by Danack
user image
Is php.net down?
@Danack Why have a brain if you can be a user
@NikiC not for me.
@NikiC I've got access
But we're both in the UK so, maybe something to do about being on the continent?
13:10
Hm, using VPN for now
works for me from NL as well
cmb
cmb
svn.php.net is down for me; bugs.php.net and git.php.net work, though
@NikiC Y U h8 me?
@Crell It's personal :P
I'm honored.
I want to get to the fetch methods across DB drivers before RC1 Tuesday. Think we can tag team this enough to gete it put to bed today? I don't know if I'll have time to do the next step otherwise.
13:26
Guys, I have 29 tables in a database. how to get all the records in a database? I mean all the rows irrespective of the table?
@RifkyNiyas That's not a thing you should be doing in SQL. Odds are whatever you're doing, you're approaching the problem wrong.
@RifkyNiyas get the list of tables from the DB, then loop through them....but yeah...why you need to do that?
@NikiC Should $result_mode become $flags, or left for unifying the various $result_mode/$fetch_mode/$fetch_stle confusion across all drivers?
:50543444. Exactly as you said. I need to give each record seperate as an ad card with its specific details on it. I have tried this..
$sql = "SELECT Table_name as TablesName from information_schema.tables where table_schema = 'pendingapproval'";
          $result = $conn->query($sql);
          if ($result->num_rows > 0) {
            // output data of each row
            while($table = $result->fetch_assoc()) {

              $tableName = array($table["TablesName"]);
              //echo "table: " . $table["TablesName"];
            }
          } else {
            echo "0 results";
          }
@Danack Is this approach wrong? How can I fix them
Can anyone say exactly how can I get the total number of rows in all tables of a database?
"SELECT COUNT(*) tablename" will give you the number of rows in a table. But again, unless you're writing an SQL management tool it sounds like you're approaching the problem wrong.
13:40
@Crell on which function is that?
For bonus confusion, I think that "result mode" can currently refer to either use/store result or "fetch array/assoc/object/..."
mysqli::query().
@Crell Ok. Here is the problem. I have 29 tables in a database called pending approval. Each row in a table is a product. I need the admin to approve a product so it is moved to main database. So in the admin panel, I need to get all the records from every table in the main database. Then show its name,price,category. If the admin approves i need it to go to main database
Sorry. To get all the records from every table from pending approval database
Why are they separate tables in the first place?
Because every product is categorized into certain categories. Each and every category have some unique column names for them
Heyo 11 o/
13:48
Yahallo
Morning all!
\o
user1804599
おはよう
Curious about something… I have an array of data. The data belongs to one of six different types. When I go to display the data I am putting a table header for one of the types. I’m then looping through the array and if the current row is of a certain type, then I print the row out in the table.
After looping through array, I go to the next type; print the table header. Loop through array again and if it matches the current type, print out the row in the table, and so on.
What I am wondering is if it would be better to loop through the array once, if the current row matches one of the six types, put it in an array for that type. After looping through the results I will have six arrays. Then just print out the results of each array under the table header of its type.
@StatikStasis can't you use array_filter?
@RifkyNiyas Turn it around then:
Products(common columns that all products have, including a type column.)
ProductsBooks(foreign key to the Products table, plus additional columns)
ProductsCDs(foreign key to the Products table, plus additional columns)
ProductsTanks(foreign keys to the Products table, plus additional columns)
13:51
@StatikStasis yes, but I would do one array with the 6 types as subkeys instead
user1804599
Just have one table with all the columns and a field that indicates the category and check constraints that assert nullness based on the category.
Or what @rightfold said. :-) It depends on whether you have a small or very large number of extra columns.
@Girgias Good idea.
@PeeHaa Also a good idea.
Thanks, guys!
@Crell Thanks mate. Should try it out
user1804599
I want to write software.
user1804599
13:55
Need a fun project still.
I've got some "fun" stuff I can send to you! =D
@PeeHaa How goes the SMB3 runs?
user1804599
Something involving digital signal processing would be super cool.
Didn't have a lot of time lately :(
=( Well that's no fun.
I have had a little more time for streaming this past week than usual.
I agree :D
14:00
@MateKocsis didn't you cover XLS with your other PR?
(the one where you did a couple of various extensions)
14:25
I'm getting an assertion failure when there's an uncaught exception: Assertion failed: (((execute_data)->func)->op_array.fn_flags & ((1 << 7)|(1 << 10))), function ZEND_BIND_STATIC_SPEC_CV_UNUSED_HANDLER, file Zend/zend_vm_execute.h, line 48112. Any idea what I might be doing wrong? The flags correspond to ZEND_ACC_IMMUTABLE and ZEND_ACC_PRELOADED.
@Trowski more context?
this does not help much :-/
what closure is that even you're trying to bind something to
14:41
@bwoebi Oops, wrong branch, this is the correct fiber.c: github.com/amphp/ext-fiber/blob/awaitable-v2/src/fiber.c
There's a closure here and here
14:52
@bwoebi If you'd like to reproduce it, v3 branch of amphp/amp, examples/fiber/exception.php and awaitable-v2 branch of amphp/ext-fiber.
15:12
@Girgias Sounds good to me then.
@Sara About bumping it to a TypeError? I would imagine that it needs to stay a warning as we explicitly voted on Notice to Warning and not more
@Girgias ah, I was wondering for a while about the exact same thing, but was too busy to check :D I'll have a look at it then soon!
@MateKocsis PDO is truly hell
Gmail is being borky for me atm, so I'll reply on list later.
On grouped attributes: I should say no, but I agree that it's arbitrary how it's blocked. Go ahead.
On strictness: Definitely call this a bugfix and just do it.
@Girgias Sorry, N->W is what I thought I was agreeing to. :)
Too many plates in the air and I'm sick today.
@Sara Right, makes more sense :)
15:21
@bwoebi Ah, I figured out what was leading to it. I was not executing the scheduler fibers to completion if there was an uncaught exception.
This is why I prefer replying on list. I tend to be more explicit about the details when I'm typing an entire email. :D
Failure to fetch error message ・ ODBC related ・ #80150
15:37
I feel like I just messed up my merge from PHP-7.4 to master sigh
Oh I did not, just the email diff is very confusing
16:14
@LeviMorrison Just wanted to make sure you saw this: github.com/php/php-src/pull/6209
^ I'm planning on merging in today to make sure it gets in before RC1. :)
@Sara =(
Should have wore your mask. =P
Was the first, second, etc. preference votes on attribute syntax for the purpose of going to the next preferred candidate in case #[] did not work out as expected?
Wes
Wes
did the vote on the syntax go wrong again?
16:29
lol- I don't know. Just saw NikiC's starred message and was wondering if that was an option if they run into more roadblocks. Although I "think" that was more of a tongue in cheek comment.
Wasn't sure if that was the purpose of the preference votes.
Wes
Wes
i thought he was ironic :B
@Wes He was ^^
Wes
Wes
i wouldn't be surprised if the vote went the opposite way though :P
@StatikStasis The purpose of the preference was to avoid vote splitting. Eg, "I like X but would be OK with Z, but unless I vote for Z Y is going to win, and Y is godawful, so I have to vote for Z." RCV eliminates that problem.

That it gives you a "backup" answer is a nice side effect, but not the main goal.
16:44
@Crell Oh ok! That makes a lot of sense now.
@Crell crell here?
@Crell Made the tables as you said!
@Crell Can you help me how can I insert the data to database?
With an INSERT statement? :-)
Or, rather, 2 insert statements. One for the Product table, one for the specific extensions table.
@Crell Should I use sql joins or
2 separate inserts, probably inside a transaction.
But really you'd have better luck with these questions in an SQL-specific forum. This is a PHP channel, not an SQL channel.
(Despite the large overlap in users.)
@Crell Ok!!! Then should I be making any foreign keys in the specific table
Oh yaahhhh. Are you available here only or there too? sql
16:57
I don't know of any specific SQL channels off hand to recommend.
It sounds like you need to read up on SQL table design and data normalization. What I've described is basically the common way of modeling "inheritance" in SQL. You can probably find some good resources for that via duck duck go with those keywords.
Mannnnnn, the other channels are offline. The sql is not active.
Thank you for your time. Ill check it out
@NikiC So anything else on the mysqli thread? I think I got everything you mentioned that made sense to me. Noted differences otherwise.
I've tried maybe 6 or 7 times to checkout the PHP documentation but each time it says connection reset by peer
It happens at a new point each time
Does anyone know if there's a way to pull it from github and then let svn think it was checked out?
17:06
@RifkyNiyas It has a good project for creating an online book store and will answer some of your early database schema design questions.
Wes
Wes
what's a way to say independent or standalone in english but with a slight negative connotation? like unsorted, unarranged, uncatalogued or something like that
@Wes Referring to a person, government, collection...?
May have to add an adjective (ex. disorganized group of....something, or, a divided republic) There is probably something better... it's on the tip of my tongue.
Wes
Wes
for example code units, like functions, classes. like general purpose but more like "not otherwise classifiable"
Oh... I was thinking about the US. Hmm let me think...
Miscellaneous?
Wes
Wes
17:13
like miscellaneous. in italian i would say "sparse", but looks like it doesn't mean the same thing in english (yes, you can often translate words literally from italian. thanks ancient rome :P however doesn't work in this case)
an arbitrary class?
So you are looking for negatively miscellaneous.
Wes
Wes
sort of, yes. unclassified is the closest thing i can think of
Outlier maybe? Not sure if that works
Miscellaneous is the closest to sparse. Why does it have to be "negative?"
And sparse is an English word also.
17:15
Disorganized? "Random" can have a negative implication in that context.
"A library full of random functions." - has a slightly disapproving connotation.
Wes
Wes
@StatikStasis doesn't it mean like "thinly dispersed"?
scattered
Wes
Wes
@Crell unorganized sounds right in my language, if that's a word in english :P
Library full of random functions:

mersenne_twister
random_bytes
random_int
openssl_random_pseudo_bytes

:D
If I threw out a handful of seeds in a plowed field haphazardly you could say, "his sowing is sparse and leaves a lot to be desired."
@Wes That is.
17:20
Usually it's Disorganized.
I would say disorganized comes off more negative than unorganized. If you want "slightly negative" unorganized would be the one, imo.
Wes
Wes
thing is, i don't want to be it really negative, just slightly :P like "unarranged" rather than "independent", but not "disordered". anyways, i think i got it. thanks all :P
I mean, that's just my opinion on how it sounds to me.
Wes
Wes
it's the same in italian
You're dealing with subtle distinctions of degree here, so which one is "more negative sounding" is going to vary person to person. In context I think unorganized, disorganized, and random would all get the job done.
Wes
Wes
17:25
unorganized should be like non-organized, which is slightly softer than disorganized
^ yeah what @Crell said. It is very subtle degrees and would probably depend heavily on the context.
Wes
Wes
i sometimes ask myself if learning stuff on the web is better now or was better in the past. i always land on all sorts of heavily SEO optimized pages, generated contents and stretched out 10 minute youtube videos that have very little actual content. in the past there was much less content but for the most part it was good
Sturgeon's Law: 90% of everything is crap.
Rob
Rob
Kind of depends on the context, but the prefix 'dis' somewhat implies deliberate action or incompetency, while 'un' is simply the opposite of something
@Wes YouTube used to be a lot better in the past, imo, because of this very reason.
I feel like I have to sniff out the sponsored crap from most searches.
17:31
Tutorials can be short videos. Reference questions absolutely should not be video.
@Rob That is sort of what I was thinking. I was thinking about someone saying a warehouse operation was unorganized. I would think it's functional but they have not applied some sound structure to the process to make it more efficient. It lacks structure. Whereas with a disorganized warehouse process I was thinking, they have an applied procedure/process but it is contributing to the issue because of its design and causes other complications.
God it is Friday... I am getting into the weeds on mundane topics. LOL! I'm ready to go home already.
Rob
Rob
Yep, agreed. Though if someone said that to me in person, their tone would far outweight the subtle difference between dis and un
The protocol server requires a form digest but the form digest in the X-RequestDigest HTTP header is not as same as the one generated by the protocol server.
How do I find the X-RequestDigest HTTP header thats generated by the server
17:51
@Rob What is "burnination?"
Oh, tag removal.
Rob
Rob
Pretty much, yep
18:09
@bigchungus Fridays are slow around here. May have to wait a bit for a response. I've not done anything with Sharepoint request authorization myself. Someone much smarter than myself I am sure will show up eventually... pretty much anyone else that joins the chat. =)
@StatikStasis grazi
^And sometimes 'in' instead 'un' depending on word that follows?
@Tpojka That throws me a lot as well.
Tell me. English is not my native, beat that. :D
It is mine... it is still hard sometimes. =)
18:15
I just wanted your and Rob's confirmation of that's correct. :D
@Tpojka and then there's inflammable :p
I'm not an English major, but I do pretend to be one when someone uses the incorrect there, their, they're, or the more uncommon there're.
I also strongly prefer the use of the Oxford comma.
@mega6382 Incompetence, inaccurate what I think top of the head.
@Tpojka no those are actually opposites of the word without the 'in' but inflammable and flammable are the same thing.
@StatikStasis yeah, that bothers me too, someone would be making a perfectly good point and then use the incorrect word like that and that just ruins it.
@StatikStasis I strive to do that as well. :D
18:20
@mega6382 done
@StatikStasis I don't like incorrect (sic!) language's use.
@PeeHaa thanks, dude :)
any time
I am testing PHP 8.0 with my projects. I have so many "Warning: Undefined array key "mon""
This is the single biggest change you have ever done to PHP
Now I have to go around and add ?? '' everywhere
@Dharman What is that?
And hello mysql!
Or rather good riddance
18:23
It was a Notice before and I couldn't care less that my array is empty. After all I either used it in echo $array['mon'] or in if($array['mon'])
Meh
You should already have an error handler set up anyway
I have so many "Warning: Undefined array key That is standard for my code. If I don't have two dozen warnings and three dozen notices, I'm not finished yet. =P
Rob
Rob
@Dharman Just put PHP's equivalent of a global try and empty catch ;)
You can't catch a warning
Rob
Rob
Dang
18:25
Sure you can
@PeeHaa A error handler is not a problem. The problem is that it's now a warning so I can't ignore them as I did with Notices
Rob
Rob
My only experience with php was 15 years ago
@Dharman That's good though :)
@Tpojka @mega6382 Dharman just brought up another one, which they correctly used. A lot of the time people will say "I could care less" instead of "I couldn't care less." Usually if someone says "I could care less" I will respond with "You could care less? Well, that's good you still care a little." It's usually my wife.
@PeeHaa I don't think you can. 3v4l.org/VJ0SZ you can set an error handler but not catch
18:28
@StatikStasis And I suppose, she couldn't care less :D
@Rob Aw, c'mon- tell us the truth now. You're a closet PHP adorer aren't ya?
Hahah. Nice catch. (No pun intended.)
@mega6382 Rolls her eyes, and says "You know what I mean." She never corrects it the next time she uses it. I think she did once and I started clapping.
Rob
Rob
@StatikStasis Heh, my university banned FTP so I wrote a site in PHP to upload/download stuff
It was... not fun. Hence the 15 year gap ;)
It's got way better! Come on back.
18:30
@StatikStasis Well, then sticking with one shape of it is good fat 50% success formula. :D
Rob
Rob
I'd rather go back to assembly :D
But jokes aside, yeah, I know PHP has improved a bunch
Just haven't found a need for it, so far
@Rob Good on you for that.
@Rob then just start your next project in it, I am sure you will love it :P
@PeeHaa Yeah, but this is a new exception that you throw from the error handler. You lose the information about callstack and the code from which it was thrown
18:33
But you just said you do not care about that
Rob
Rob
@mega6382 If I start a new project, it'll probably be with a new fancy language, like go or angular/react, just for the resume
We should give PHP 8 a fancy name, so it will seem like its a new language or something
I am so excited to use match in my code
PHP#
@PeeHaa Apparently @Dharman could care less.
18:35
@Alesana iknowright???
PHP should go with primes. 11 instead 8 for example.
It's everything I wanted switch to be and more
I said I didn't care about Notices. Now that they are warnings I will have to convert them all into ErrorException and fix
match, null coalesce, and constructor promotion would have been so useful in the script I was working on yesterday and this afternoon.
No you said you do not care if you are doing potentially broken shit
Rob
Rob
18:37
@mega6382 As dumb as it sounds... probably. PHP has a bad name, hard to recover from. Javascript was the same, but lucked out by being the only ... feasible... language in a browser
It's not broken
Pretty sure I said potentially broken
Rob
Rob
Surprised ruby doesn't get the same rep as PHP, but anyways
Just because I don't check for an existence of a key in an array doesn't mean my code is broken
it works perfect
@Crell What's new with null coalesce in PHP 8?
18:38
Ruby has the hipster market cornered.
@Rob And typescript helped it quite a bit, it is somewhat useless in the backend without it
$array['a'] += 2; <-- this works and is not broken
Rob
Rob
Backend javascript is an entirely different beast. I can accept front-end javascript... but backend... no thanks
@Dharman We just have a different idea of broken
2 weeks until the blog post on it comes out. :-) Seriously though,

$res = $foo?->bar()?->baz.

If $foo or the result of bar() are null, then the whole thing evaluates to null without further errors. Whereas today you have to have a ton of if (!is_null($foo)) nonsense going on.
18:39
Have attributes(decorators) been implemented in PHP 8? what syntax was decided on? and does it have support for parameter level attributes?
Yes, Rust-style, yes.
I love how Room 11 can be quiet for a couple of hours on Friday and then all of a sudden it's teeming with life again, like a school of developers just swim through all at once.
@Crell thanks, that's cool
@Crell Ohh that's super useful. I always thought that the null coalesce should do that by default when you do $foo->bar->baz ?? 'foo'
But now it'd be $foo?->bar?->baz ?? 'foo'; right?
Correct.
18:43
Nice. I also just read about constructor promotion and that's amazing
@Alesana will that work for arrays too? cause I am sick of getting, undefined index errors
@mega6382 I thought it already worked with arrays?
3v4l.org/TtEfn - looks like
Still think that question mark needed to go before variable as it's natural place where question mark goes when something is missing.
Ah @Crell beat me to it
18:45
/me is speedy.
Rob
Rob
@Tpojka What do you mean?
@Tpojka ¿bar()?
?$foo->?bar->baz ?? 'foo'
@Tpojka It goes after the variable it applies to
Already if baz is not set it will do the null coalesce
Rob
Rob
Question mark before seems super awkward to me
18:46
$foo = (object) [];
echo $foo->bar ?? 'baz; // baz
@Alesana That's reason for my comment.
Ah I missed that
@Rob Such is function (array $a): ?object {}
I think if we do that then we should also do $foo = ??$bar $baz
Wes
Wes
@PeeHaa ¿cantina()?
18:47
:D
Rob
Rob
@Tpojka Is that actual syntax in PHP, though?
I agree it looks a bit weird but before would be inconsistent
Rob
Rob
Rather than object? {}?
@Rob Opt to null.
What's a good example use case for WeakMap? I'm struggling to come up with one that isn't highly contrived.
Rob
Rob
18:48
Hmm... well then, consider my absence from PHP to last longer than 15 years ;)
3
Sorry, I shouldn't jump into this room to rag on PHP
@Rob There's someone right in line behind you. =P
@Crell Pretty sure only caching is a reasonable usage
Right, but caching what, exactly?
@Crell If you want to add out-of-band information to an object, such as PDO, but you don't want your out-of-band data to keep the connection alive.
18:51
Hm, elaborate that a bit more?
Rob
Rob
@StatikStasis Heh, probably. Wouldn't mind so much the order, since Spanish has the concept of question marks before the word... but I do value consistency a bit
I like PHP for what it is, how it's built, the community, etc... I understand it gets a lot of shit but I really like the idea of it. The only other language I want to learn well right now is C but just so I can help contribute to PHP one day :p
Among scripting languages, I'd argue it is the fastest and most robust. It doesn't compete with Go or Rust so N/A, but compared with Python, Ruby, or JS? PHP hands down.
@Crell oh cool, I wasn't sure so I thought it was probably the same as ternary 3v4l.org/0u1ir
@Rob What if we offer you consistent inconsistency? Would that work for you?
@Crell Let's say I want to keep track of the DSN so that when I execute a query I know what it's trying to connect to.
Rob
Rob
Heh, PHP is the master of consistent inconsistency ;)
But yes, I do concede it did have a big hand in the evolution of server side scripting
So there's that
@Crell I thought Python was well known for being fast
At my last job we were working with another team of python developers and they always ragged on PHP
Python is well known for being slow, unless you're using a C level library for the advanced math, which they have readily available. That's why it's so popular in data science.
@Alesana I have heardd more about it being slow than fast tbh
18:54
The biggest motivation for ? going before the type is generics; if we are in a <?php open tag, then we know Foo<?PhpObject> isn't opening a new context, but on the other hand it is difficult to know if it's supposed to close one: Foo<PhpObject?>.
It's not the engine, it's the library availability.
We don't have generics, but Hacklang did, and at the time it seemed a small cost to keep the syntax consistent with theirs.
@mega6382 Interesting. I always thought that the only reason it was making a comeback was it's speed and usefulness for machine learning
how fast is php's ffi compared to running that code directly?
@Alesana If Python is fast it's because it's using high-level C libraries beneath it :)
18:56
Depends on the code and how much back and forth it has with user-space.
@Alesana No, its because of its massive suit of algorithms and libraries for big data
The C parts run at the speed of C. The calls across the FFI boundary are ~3x the cost of just reading/calling within PHP.
PHP is one of the most consistently fast interpreted languages that does not have a JIT compiler. Of course, we are entering JIT world soon...
Rob
Rob
@LeviMorrison Heh, that should have been obvious to me but I completely forgot about the syntax for injecting PHP into HTML. At least it's.. justifiably inconsistent :)
The speed of light!
18:56
Ahh okay. I was told report generation should be done with Python instead of PHP since it's faster, but I guess they didn't know what they were talking about
There's no conceptual reason why all of the C libraries Python wraps couldn't be bridged to PHP-FFI. It just hasn't happened yet. That's one of the main reasons FFI was added.
@LeviMorrison PHP will soon use a JIT compiler?
PHP 8 has a JIT engine.
If you enable it, and only for certain things, yes.
What's the purpose of enabling it? I am not too familiar with Java or how the apps are built
18:58
@Alesana If your task is mostly IO, then the IO will swap whatever language you're in. All 4 scripting languages will be reasonably close.
Also, it's a great example for saying that being fast is not as important as other aspects of the language. If it was then PHP would have more market share and Ruby wouldn't have any at all (though they have been focusing on improving it recently).
I personally feel like a lot of the things if not most the things people say poorly about PHP has been fixed in later versions
@Alesana You want to find out what bugs it has!
@Alesana Definitely. Most of the PHP-hate is PHP 4-era out of date.
@StatikStasis Btw gamers, RollerCoaster Tycoon® 3: Complete Edition totally free on epicgames.
18:59
nice!
00:00 - 19:0019:00 - 00:00

« first day (3632 days earlier)      last day (1541 days later) »