Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

dseguy

@dseguy@phpc.social
mastodon 4.7.3
  • Open on phpc.social

Static code analysis maestro @Exakat@phpc.social #PHP expert elePHPant breeder. https://linktr.ee/exakat

344 Followers
333 Following
50 Posts
Joined May 02, 2022
Open post
dseguy @dseguy@phpc.social
· 3w ago
The #PHP SIG onboarding group is working of an introduction book for our favorite language. The current draft 0.4.0 is available here, with numerous feedbacks, smoother progression and various fixes. If you are starting with #PHP, read it and bring me what can make it even more awesome. DM are open! https://thephpbook.readthedocs.io/en/latest/title-page.html
The PHP Book - The PHP Book - 0.4.1
thephpbook.readthedocs.io

The PHP Book - The PHP Book - 0.4.1

The PHP Book - The PHP Book - 0.4.1

4
1
5
0
Open post
dseguy @dseguy@phpc.social
· 1mo ago
Replying to
@heiglandreas@phpc.social @jrf_nl@phpc.social Indeed, this is all due to Unicode, and the assumption that K is an K, while there are some awesome features in Unicode that can be ... misused. I guess that part is universal. I have seem duplicate named files with the same trick as above (you might give it a try). As for variable names, it seems that PHP is the only one (Not sure, in fact) to allow ANY unicode, others have more restrictive rules of naming. I have another article about such deceptions coming.
2
1
0
0
Open post
dseguy @dseguy@phpc.social
· 1mo ago
Replying to
@jrf_nl@phpc.social And what about this beauty, where var_dump($café === $café); yields a .... false? https://3v4l.org/m1X4Y#v
m1X4Y - created on 3v4l.org
3v4l.org

m1X4Y - created on 3v4l.org

View the output of this script on 3v4l.org: the online PHP shell with 500+ PHP versions

1
2
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@Njames@phpc.social I hate it when it supports 'anything' but leaves out #PHP or anything else. I guess marketing is not a subtle field. I started a list of language-agnostics tools and services that have #PHP support, that I call alsoPHP. It includes a list of tools that do not support PHP. Hopefully, that might help raise awareness and motivate adding such support. https://codeberg.org/exakat/alsoPHP
Codeberg.org

alsoPHP

A list of tools that supports many languages, including PHP, or not.

4
2
0
0
Open post
dseguy @dseguy@phpc.social
· 2mo ago
#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 #phptrickhttps://php-tips.readthedocs.io/en/latest/tipSection.html
php-tips.readthedocs.io
3
0
1
0
Open post
dseguy @dseguy@phpc.social
· 7mo ago

I just ran into PHPoC, aka #PHP on a Chip! The company provides IoT solutions, with components programmables with #PHP!

The website also is made with #PHP, but of course!

https://www.phpoc.com/

phpc.social

PHP Community on Mastodon

13
3
9
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@asgrim@phpc.social ok, I feel your pain. Maybe we can do something…
2
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago

From #mastodon you can hop to #lemmy and get daily news about #PHP

https://lemmy.world/c/php

It's not much, but it's honest work.

phpc.social
2
0
2
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

I don’t use ai generated image but when i do, it shows #dpc 😂

phpc.social

PHP Community on Mastodon

7
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

Old elePHPant meeting future delta robot elePHPant #dpc

phpc.social

PHP Community on Mastodon

6
0
3
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@asgrim@phpc.social #PHP code, or for extensions?
1
2
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@bobmagicii@phpc.social Good luck!
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago

#PHP delivers

phpc.social

PHP Community on Mastodon

1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@Njames@phpc.social I prefer to be positive, rather than non negative. Surprisingly, it is not the same.
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 7mo ago

Would it be cool to have a #PHP ::parent operator, like we have the ::class operator

Well, turns out we can.

#phptip #phptrick

https://php-tips.readthedocs.io/en/latest/tips/parent_operator.html

phpc.social

PHP Community on Mastodon

4
0
4
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

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

https://php-tips.readthedocs.io/en/latest/tips/preg_split.html

phpc.social

PHP Community on Mastodon

2
1
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago
Replying to
@joepferguson great job, Joe! I’ll make sure to refer people to it.
2
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

#PHP puzzle of the day: can you make Chidren::foo() call GrandParents::foo() ?

Think about it, and then, click below for the solution(s).

#phptip #phptrick

https://www.exakat.io/calling-all-ancestors/

phpc.social

PHP Community on Mastodon

2
0
1
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

#PHP defined() in action: there are many aspects when checking for a constant existence.

#phptip #phptrick

https://php-tips.readthedocs.io/en/latest/tips/defined.html

phpc.social

PHP Community on Mastodon

1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

#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

https://php-tips.readthedocs.io/en/latest/tips/compare_nan.html

phpc.social

PHP Community on Mastodon

1
0
1
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

Enumerations are backed by strings, they work with in_array(), but not with array_unique()

Well, at least, not directly.

Also, did you know Enum::cases() ?

#phptip #phptrick

https://php-tips.readthedocs.io/en/latest/tips/array_unique_and_enum.html

phpc.social
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

Quite a nice take on the current situation.

https://blog.lmorchard.com/2026/03/11/grief-and-the-ai-split/

blog.lmorchard.com
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago
Replying to
@Synchro I am, I am! and I'm keeping 500km distance between you and me when doing it... to show the right level of respect!
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago
Replying to
@Synchro Are you telling me that I know a world famous STAR ?!?!!?
1
2
0
0
Open post
dseguy @dseguy@phpc.social
· 7mo ago
Replying to
I added it to the list of #PHP meanings
1
0
0
0
Open post
dseguy @dseguy@phpc.social
· 5mo ago
Replying to
@ralflang@phpc.social This one, right? https://github.com/amishmm/php-pam
GitHub

GitHub - amishmm/php-pam: This extension provides PAM (Pluggable Authentication Modules) integration for PHP

This extension provides PAM (Pluggable Authentication Modules) integration for PHP - amishmm/php-pam

0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 2w ago
Replying to
@heiglandreas@phpc.social @ConFooCa@techhub.social the rivers are frozen in that time of year. Bring your skates…
0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 2mo ago
Replying to on phpc.social
@vohanj@phpc.social I did leave some bait in this picture.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

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

https://php-tips.readthedocs.io/en/latest/tips/static_arrow_function.html

phpc.social

PHP Community on Mastodon

0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@Patchbot_de@mastodon.social Is this a bit early? I don't see it yet: it might be tomorrow.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@awoodsnet@phpc.social nah, I was quite vague in the constraints, so that count. Actually, you ended in the cul-de-sac that started the whole post: self, parent then what? And if you want some fun read, I even conceptualized a 'grandparent' operator here: https://php-tips.readthedocs.io/en/latest/tips/parent_operator.html greatgrandparent included... :D
php-tips.readthedocs.io
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
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 https://php-tips.readthedocs.io/en/latest/tips/unreachable_method.html
php-tips.readthedocs.io
0
3
1
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
A manually curated list of multi-language applications that also supports #PHPhttps://www.exakat.io/also-php-a-curated-watchlist-for-the-php-ecosystem/
exakat.io
0
0
3
0
Open post
dseguy @dseguy@phpc.social
· 3w ago
Replying to
@fabiocosta0305@ursal.zone Well noticed. This book considers you have some computer science knowledge, may be another language to any level. It relies on common features, and push #PHP specific ones. We have another version of the book with no such pre-requiste.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 2w ago
So, it's too late for #PHP 8.6, but can I ask for composable first class callable of the second order for #PHP 8.7? I tried even with |> operator, it fails. Is the only solution here to do a closure? Try it yourself : https://3v4l.org/eUjJ4#v8.5.10 Damned, already talking about #php 8.7?
eUjJ4 - created on 3v4l.org
3v4l.org

eUjJ4 - created on 3v4l.org

View the output of this script on 3v4l.org: the online PHP shell with 500+ PHP versions

0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 7mo ago
Replying to
@flowcontrol@phpc.social I suspect sleep() relies on the internal clock, which might be changed at any moment. But I have never observed it. I think hrtime() works better for that, and is system immune. All in all, this looks like something going to the php-tips archive :)
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@timwolla@phpc.social Yep, Reflection saves the day too. Nice.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 2w ago
You are living in a bad neighboorhood (in terms of network...) Is that better ?
0
2
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@gmazzap@phpc.social Indeed, good answer. And my framing of the question was vague enough, so it applies here. There is no way to forbid a class (anonymous or not) to extend an abstract class (can't be final, right?) so this is a classic and useful trick (think tests). Now, I was considering reaching A::foo() from C. That happens when the class hierarchies grows a bit too much.
0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 5mo ago
Replying to
@ralflang@phpc.social I was looking for a longer post to publish it on daily.dev. I used the repo, LGTM. Thanks for updating it.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 2mo ago
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 #phptrickhttps://php-tips.readthedocs.io/en/latest/tips/less_arguments.html
php-tips.readthedocs.io
0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 3mo ago
Replying to
@bobmagicii@phpc.social #php tip, right? I feel your pain...
0
1
0
0
Open post
dseguy @dseguy@phpc.social
· 2mo ago
Replying to
@phphil@phpc.social yes, this is a bit of a bait. Another code works behind the link.
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 7mo ago
Replying to
@SenseException@phpc.social works with other languages too, and it leave lots of people puzzles or angry Even…
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 2mo ago
Replying to
@Girgias@phpc.social @girgias@phpc.tv 1400 BST, British Summer Time. So, 15h00 CET (Central Europe Time).
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

Strategies to rename a parameter in a #PHP method

https://www.exakat.io/renaming-parameters-in-a-method/

phpc.social

PHP Community on Mastodon

0
2
1
0
Open post
dseguy @dseguy@phpc.social
· 2w ago
Replying to
@jrf_nl@phpc.social mmm, yes. 😜
0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 6mo ago

#[ReturnTypeWillChange] works on native #PHP methods and also on custom ones.

#phptrick #phptip

https://php-tips.readthedocs.io/en/latest/tips/returntypewillchange_for_all.html

phpc.social

PHP Community on Mastodon

0
0
0
0
Open post
dseguy @dseguy@phpc.social
· 1mo ago
Replying to

@davewoodx@mastodon.social @GeekAndDad@mastodon.social

What a toot packed full of surprises!

  • OTAgo is a distribution system for iOS and Android App! I never knew it was possible to do that outstide Apple.
  • "PHP is dead simple to use" is a great come back to the other meme. (Not the actual quote, but I read too fast)
  • #PHP delivers (personal mandatory quote)

You made my day!

0
0
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 18:56:15 UTC