#phptip — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #phptip, aggregated by home.social.
-
@jrf_nl Ah that is a classic source of fun.
I think you can augment this discussion with this article.https://www.exakat.io/when-php-meet-unicode-a-tour-of-identifiers-beyond-ascii/
Spoiler: there is no such animal as a polar elePHPant.
-
@jrf_nl Ah that is a classic source of fun.
I think you can augment this discussion with this article.https://www.exakat.io/when-php-meet-unicode-a-tour-of-identifiers-beyond-ascii/
Spoiler: there is no such animal as a polar elePHPant.
-
@jrf_nl Ah that is a classic source of fun.
I think you can augment this discussion with this article.https://www.exakat.io/when-php-meet-unicode-a-tour-of-identifiers-beyond-ascii/
Spoiler: there is no such animal as a polar elePHPant.
-
@jrf_nl Ah that is a classic source of fun.
I think you can augment this discussion with this article.https://www.exakat.io/when-php-meet-unicode-a-tour-of-identifiers-beyond-ascii/
Spoiler: there is no such animal as a polar elePHPant.
-
@jrf_nl Ah that is a classic source of fun.
I think you can augment this discussion with this article.https://www.exakat.io/when-php-meet-unicode-a-tour-of-identifiers-beyond-ascii/
Spoiler: there is no such animal as a polar elePHPant.
-
A quick peak at how to check if a #PHP string is a integer.
As usual, there are some findings. More on that later.
https://php-tips.readthedocs.io/en/latest/tips/check_if_integer.html
-
A quick peak at how to check if a #PHP string is a integer.
As usual, there are some findings. More on that later.
https://php-tips.readthedocs.io/en/latest/tips/check_if_integer.html
-
A quick peak at how to check if a #PHP string is a integer.
As usual, there are some findings. More on that later.
https://php-tips.readthedocs.io/en/latest/tips/check_if_integer.html
-
A quick peak at how to check if a #PHP string is a integer.
As usual, there are some findings. More on that later.
https://php-tips.readthedocs.io/en/latest/tips/check_if_integer.html
-
A quick peak at how to check if a #PHP string is a integer.
As usual, there are some findings. More on that later.
https://php-tips.readthedocs.io/en/latest/tips/check_if_integer.html
-
Pop quizz #PHP on Friday evening:
How can you remove an argument between the parent class and the child class? Is that an impossible task?
https://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
-
Pop quizz #PHP on Friday evening:
How can you remove an argument between the parent class and the child class? Is that an impossible task?
https://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
-
Pop quizz #PHP on Friday evening:
How can you remove an argument between the parent class and the child class? Is that an impossible task?
https://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
-
Pop quizz #PHP on Friday evening:
How can you remove an argument between the parent class and the child class? Is that an impossible task?
https://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
-
Pop quizz #PHP on Friday evening:
How can you remove an argument between the parent class and the child class? Is that an impossible task?
https://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
-
#PHP 8.4 introduced array_find() to look for a value in an array, and also, its cousin, array_find_key(), which returns the key where to find that value.
The second got less attention, but is arguably more useful.
-
#PHP 8.4 introduced array_find() to look for a value in an array, and also, its cousin, array_find_key(), which returns the key where to find that value.
The second got less attention, but is arguably more useful.
-
#PHP 8.4 introduced array_find() to look for a value in an array, and also, its cousin, array_find_key(), which returns the key where to find that value.
The second got less attention, but is arguably more useful.
-
#PHP 8.4 introduced array_find() to look for a value in an array, and also, its cousin, array_find_key(), which returns the key where to find that value.
The second got less attention, but is arguably more useful.
-
#PHP 8.4 introduced array_find() to look for a value in an array, and also, its cousin, array_find_key(), which returns the key where to find that value.
The second got less attention, but is arguably more useful.
-
So, it seems that it is possible to paint oneself in a corner and write an unreachable method. How would you call A::foo() in this code below?
Come on, #PHP, there must be something here.
https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
-
So, it seems that it is possible to paint oneself in a corner and write an unreachable method. How would you call A::foo() in this code below?
Come on, #PHP, there must be something here.
https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
-
So, it seems that it is possible to paint oneself in a corner and write an unreachable method. How would you call A::foo() in this code below?
Come on, #PHP, there must be something here.
https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
-
So, it seems that it is possible to paint oneself in a corner and write an unreachable method. How would you call A::foo() in this code below?
Come on, #PHP, there must be something here.
https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
-
So, it seems that it is possible to paint oneself in a corner and write an unreachable method. How would you call A::foo() in this code below?
Come on, #PHP, there must be something here.
https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
-
#PHP quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value?
And more than one of us has this bug ATM.
https://php-tips.readthedocs.io/en/latest/tips/not_set_but_exists.html
-
#PHP quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value?
And more than one of us has this bug ATM.
https://php-tips.readthedocs.io/en/latest/tips/not_set_but_exists.html
-
#PHP quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value?
And more than one of us has this bug ATM.
https://php-tips.readthedocs.io/en/latest/tips/not_set_but_exists.html
-
#PHP quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value?
And more than one of us has this bug ATM.
https://php-tips.readthedocs.io/en/latest/tips/not_set_but_exists.html
-
#PHP quiz of the day: how can a property be both not set, empty() and failing at comparison with falsy value?
And more than one of us has this bug ATM.
https://php-tips.readthedocs.io/en/latest/tips/not_set_but_exists.html
-
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
-
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
-
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
-
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
-
New word: zombie closure
That is when you put $this in a static closure, you can run the #PHP code but you can't call it.
Just a reminder about static arrow functions.
https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html
-
#PHP defined() in action: there are many aspects when checking for a constant existence.
-
#PHP defined() in action: there are many aspects when checking for a constant existence.
-
#PHP defined() in action: there are many aspects when checking for a constant existence.
-
#PHP defined() in action: there are many aspects when checking for a constant existence.
-
#PHP defined() in action: there are many aspects when checking for a constant existence.
-
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
-
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
-
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
-
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
-
preg_split() splits #PHP strings with regexes, captures the separators and can handle an empty regex.
You don't need that everyday, but when you do, #PHP has it!
https://php-tips.readthedocs.io/en/latest/tips/preg_split.html
-
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
-
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
-
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
-
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
-
#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.
https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html
-
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html
-
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html
-
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html
-
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html
-
#PHP's NAN is 0 as an integer, 'NAN' as a string and not comparable with itself.
Also, there are now warning when using them, so no one can get hurt by this.
https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html