« first day (3402 days earlier)      last day (1770 days later) » 

Jpv
Jpv
00:02
Np, i was helped, now i helped. i can leave now. byeeeeeeeeeee x)
00:13
@beberlei both charset and collation are utf8 on mysql side...
collation has nothing to do with the connection charset
That's for MySQL to figure out how to sort your table. What you need to be concerned with is the negotiated connection characterset. That's set in the DSN in PDO or by mysqli_set_charset
That's the thing that tells your DBMS how to encode things before it sends them over to PHP.
@agentprovocateur
@agentprovocateur Also, you should read: mathiasbynens.be/notes/mysql-utf8mb4 if you're using MySQL/MariaDB and UTF8
TL;DR; use utf8mb4 not utf8
ThW
ThW
@Sherif does setting the collation on the connection affect any comparsion operator/function? justthinking
@ThW Collation is not a connection thing. It's a DBMS thing.
It has absolutely no effect on what's sent over to PHP.
The only thing it effects is what happens internally inside of your DBMS when it does things like sort rows in a resultset.
ThW
ThW
Not talking about that, but operators/functions in the SQL
@ThW Yes, collation effects all sorting operations internally.
For example, how to sort ä vs a. Which one comes first? That's what collation tells it how to do.
ThW
ThW
00:28
I implemented XSLT 2/3 stuff for PHPs XSLT processor over the holidays, learned a lot about collations... and how powerful ext/intl is.
Welcome to the wonderful world of i18n!
ThW
ThW
@Sherif and after strings, here are dates :-)
Dates are strings too
ThW
ThW
true but some syntax is expected
Those things aren't mutually exclusive, you know.
 
9 hours later…
09:21
Why is the "releasing a PHP 7.5 version" topic coming up over and over
 
2 hours later…
11:34
Huh, you can't declare a function static
Is there any reason for that?
(as in not in a Class)
cmb
cmb
11:54
@Girgias counterquestion: what would that mean?
Hum, good question, I suppose that it's "pure" as in no side effect
But that's not necessarely the semantic of static in classes
Hi
require 'vendor/autoload.php';


$myArr = array(
'person' => array(
'first_name' => 'Jenny',
'last_name' => 'Jackson'
)
);


$firstName = array_get($myArr, 'person.first_name');

echo $firstName;
@Girgias $foo = static function () {}
Why is this not working
@PeeHaa I want a named function sadly
12:06
I have used illuminate/support in composer
@user123456789 what is "not working"? Do you get an error message?
@user123456789 person.first_name that looks like JSON syntax, not PHP
Should be something like $myArr[person][first_name] I think
12:21
My main question is
what on earth is array_get()
It's some stupid laravel helper
It allows you to use "array paths"to access array data
Which makes no sense in 99% of the case imo
Maybe to search an array for a value? I'm not all too familiar with the array_ functions. I usually have to google them.
But honestly, that array should be turned into a couple classes, depending on its use
 
2 hours later…
cmb
cmb
14:28
@PeeHaa this static is implied by (standalone) function definitions, isn't it?
14:42
Has PHP 6 been released yet
14:54
That's a troll right? :thinking:
Sir, I don't take kindly to such accusations.
:thinking:
 
2 hours later…
17:05
@Girgias yes
ltns @littlepootis
17:36
You know how you know your brain isn't as sharp as it used to be?
It takes you 30 seconds to recall what ltns stands for.
@Sherif did you google it?
I did
It's mostly reflex now. Anything I can't immediately recall I google.
same
double-click, right-click, google
 
2 hours later…
19:59
Hi guys, I was playing around with the new typed properties and noticed that TypeErrors thrown by uninitialized properties cannot be catched: 3v4l.org/PKKc2
Do I miss something? :)
Yes, that's not the error you're looking for.
The error you're experiencing is because you're reading from an uninitialized property, not writing to it
if you did $user->name = []; or something like that, you'd get what you expect
Yeah, I know you can't access to uninitialized properties, but I was expecting to be able to catch those errors.
You're trying to catch a TypeError though - Which isn't what that exception is. You want just "Error"
Oh... I had the impression it's a TypeError. Thanks! :D
Well... that's a bit embarrassing :D
no worries

« first day (3402 days earlier)      last day (1770 days later) »