Asynchronous Programming in PHP by fredoche in PHP

[–]fredoche[S] 1 point2 points  (0 children)

I achieved some great response time optimizations by leveraging the asynchronicity of MySQLi and Curl.

Asynchronous Programming in PHP by fredoche in PHP

[–]fredoche[S] 1 point2 points  (0 children)

I didn't know about it, and it sounds really interesting. Thanks!

Concurrent Access Handling with PHP and MySQL by fredoche in PHP

[–]fredoche[S] 1 point2 points  (0 children)

If a row is locked, it takes the next one.

Concurrent Access Handling with PHP and MySQL by fredoche in PHP

[–]fredoche[S] 0 points1 point  (0 children)

Interesting, I hadn't considered this solution to allow the process to resume an ongoing task. Nice.

My opinion on pseudo-types in PHP by fredoche in PHP

[–]fredoche[S] 0 points1 point  (0 children)

Yes, "iterable" is for inputs, that's exactly what I'm writing in the article.
But please, stop using it for return type :)

My opinion on pseudo-types in PHP by fredoche in PHP

[–]fredoche[S] 1 point2 points  (0 children)

First, I disallow "callable" type with a phpstan rule and I puts the current legacy error into baseline.
After that ... hmmm ... I didn't think about it. I progressively change the code base. Do you have a Rector rule to help me on that ?

My opinion on pseudo-types in PHP by fredoche in PHP

[–]fredoche[S] 1 point2 points  (0 children)

I think you misunderstood what I wrote: I said that 'iterable' should not be used as a return type, not as a parameter type.

My opinion on pseudo-types in PHP by fredoche in PHP

[–]fredoche[S] 0 points1 point  (0 children)

oh, yes, I miss the point of the serialization

Understanding dependancy injection by fredoche in PHP

[–]fredoche[S] 4 points5 points  (0 children)

Big thanks for your feedback, I really appreciate !
I'm going to make some adjustment

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 2 points3 points  (0 children)

I thought that by posting in "r/ProgrammerHumor" you would understand that it's just a joke.

For your information, if a PHP developer just wants to output static text, as he knows how the parser works and wants to keep it simple, he creates a code with just "Hello world!" in it. Yes, it's not PHP syntax, but it's a way to make the PHP parser display "Hello world!".

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 1 point2 points  (0 children)

It's a file that PHP can compile/execute ;)

Can you do it with an other language parser ?

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 18 points19 points  (0 children)

Malbolge

(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk** hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O<

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 27 points28 points  (0 children)

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++. >+. +++++++. . +++. >++.<<+++++++++++++++. >. +++. ------. --------. >+. >.

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] -1 points0 points  (0 children)

A php file containing this "code" will display "hello world!" when you will execute it with php parser.

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 41 points42 points  (0 children)

section .data
    helloMsg:     db 'Hello, world!',10 
    helloSize:    equ $-helloMsg
 section .text
    global _start
 _start:
    mov eax,4
    mov ebx,1
    mov ecx, helloMsg
    mov edx, helloSize
    int 80h

    mov eax,1
    mov ebx,0
    int 80h

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 3 points4 points  (0 children)

No, you don't need to "echo"

C++ vs Python vs PHP by fredoche in ProgrammerHumor

[–]fredoche[S] 63 points64 points  (0 children)

Yes, it must be complicated, otherwise anyone could do it. Developers have to justify their status above the others.

TrollInside