home.social

#phptip — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #phptip, aggregated by home.social.

fetched live
  1. @jrf_nl Ah that is a classic source of fun.
    I think you can augment this discussion with this article.

    exakat.io/when-php-meet-unicod

    Spoiler: there is no such animal as a polar elePHPant.

    #phptip #phptrick

  2. @jrf_nl Ah that is a classic source of fun.
    I think you can augment this discussion with this article.

    exakat.io/when-php-meet-unicod

    Spoiler: there is no such animal as a polar elePHPant.

    #phptip #phptrick

  3. @jrf_nl Ah that is a classic source of fun.
    I think you can augment this discussion with this article.

    exakat.io/when-php-meet-unicod

    Spoiler: there is no such animal as a polar elePHPant.

    #phptip #phptrick

  4. @jrf_nl Ah that is a classic source of fun.
    I think you can augment this discussion with this article.

    exakat.io/when-php-meet-unicod

    Spoiler: there is no such animal as a polar elePHPant.

    #phptip #phptrick

  5. @jrf_nl Ah that is a classic source of fun.
    I think you can augment this discussion with this article.

    exakat.io/when-php-meet-unicod

    Spoiler: there is no such animal as a polar elePHPant.

    #phptip #phptrick

  6. A quick peak at how to check if a #PHP string is a integer.

    As usual, there are some findings. More on that later.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  7. A quick peak at how to check if a #PHP string is a integer.

    As usual, there are some findings. More on that later.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  8. A quick peak at how to check if a #PHP string is a integer.

    As usual, there are some findings. More on that later.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  9. A quick peak at how to check if a #PHP string is a integer.

    As usual, there are some findings. More on that later.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  10. A quick peak at how to check if a #PHP string is a integer.

    As usual, there are some findings. More on that later.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  11. 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?

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  12. 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?

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  13. 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?

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  14. 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?

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  15. 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?

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  16. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  17. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  18. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  19. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  20. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  21. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  22. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  23. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  24. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  25. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  26. And this is not a PHP integer, because, even as it is an integer initially, it goes beyond the PHP_INT_MAX, which is signed. So, it ends as a float, or a string.

    So, this is all logical, but also, quite surprising.

    #phptip #phptrick

  27. And this is not a PHP integer, because, even as it is an integer initially, it goes beyond the PHP_INT_MAX, which is signed. So, it ends as a float, or a string.

    So, this is all logical, but also, quite surprising.

    #phptip #phptrick

  28. And this is not a PHP integer, because, even as it is an integer initially, it goes beyond the PHP_INT_MAX, which is signed. So, it ends as a float, or a string.

    So, this is all logical, but also, quite surprising.

    #phptip #phptrick

  29. And this is not a PHP integer, because, even as it is an integer initially, it goes beyond the PHP_INT_MAX, which is signed. So, it ends as a float, or a string.

    So, this is all logical, but also, quite surprising.

    #phptip #phptrick

  30. And this is not a PHP integer, because, even as it is an integer initially, it goes beyond the PHP_INT_MAX, which is signed. So, it ends as a float, or a string.

    So, this is all logical, but also, quite surprising.

    #phptip #phptrick

  31. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  32. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  33. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  34. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  35. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  36. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  37. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  38. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  39. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  40. 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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  41. 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!

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  42. 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!

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  43. 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!

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  44. 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!

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  45. 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!

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  46. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  47. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  48. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  49. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat

  50. #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.

    #phptip #phptrick

    php-tips.readthedocs.io/en/lat