« first day (3838 days earlier)      last day (1100 days later) » 
00:00 - 20:0022:00 - 00:00

10:01 PM
If we want to implement this RFC wiki.php.net/rfc/mysqli_execute_parameters what would be a good function name to use?
We can't use the suggested execute as it is already in use. We can't extend mysqli_query either because of the mode parameter
 
perhaps deprecate mysqli_* functions in favor of the OOP approach ?
 
execute_with_params ..?
 
add_sugar_cakes
 
I was thinking of deprecating procedural style but unfortunately that is the whole appeal of mysqli. People coming from PHP 4 can easily convert to mysqli
 
just make it available in the OOP form so people see that the oop approach has some advantages vs the procedural style
 
10:11 PM
I doubt execute_with_params is catchy enough to convince people to use it
 
PHP 4, do dinosaurs still exist ? D:
 
@ln-s That would just put people off using this function at all. You need to know the audience :)
 
Perhaps ... it's just a parameter in the function
and not another function
 
Then call it mysqli_xXx_eXeCut3_xXx_420x69 ... but calling it what it is would probably be easier
 
:)
 
10:13 PM
@ln-s I wish this was not the case, but projects written in PHP 4 got migrated to PHP 5 with no effort and then to PHP 7 with no effort and they haven't changed in 20 years
 
@Dharman Those people are beyond help.
 
mysqli_prepare($sql, [ ':sugar' => 1, ':cakes' => 1], $withPlaceholders=true)
Something along those lines
But I would say it's time to move forward
 
@ln-s That is actually not bad
I think this might actually work
altough it's less intuitive...
 
Yes, when the fn name is too complicated and the functionality is almost the same, I always think "maybe it's a param ..." and I find out indeed it is
 
If it's a new function there's always calling by arg name
But making a function do too much usually ends up in a mess
 
10:16 PM
Well you don't break functionality in this way, or add a new function, just a param, if you think about it, most old PHP4 / 5 projects have a singelton like pattern for connections, so it would be just adding this parameter to the singleton class (with a new method name so other queries with ? would still work)
Still you can take advantage if you like dinos
 
10:45 PM
I've noticed that sometimes when I do output in my scripts, it's slow, compared to when I just supress the output
And I've always wondered about the cause
is stdout slow or something like that? Would like to understand
 
I/O tends to be slow relative to the rest of your application
 
but why
I would assume stio is ram
stdio*
I meant stdout, sorry
 
stdout is whatever the code that executes your command says is stdout
Generally that's gonna be a terminal window or some console
But it could just as easily be a file or a pipe to something else
stdout is a stream of data... where that stream is connected to more often than not involves some kind of I/O operation
I/O is expensive because that's how computers work :P
 
Isn't stdout just RAM storage tho
 
In a nutshell stdout is a stream for you to send text data to the thing that started your application. stdin is a stream for you to receive text data from the thing that started your application. stderr is a stream for you to send text data that details error information to the thing that started your application.
 
10:55 PM
So it's stored on disk somewhere I'd assume
 
or maybe i stream it directly from your application to an http request
or store it in a file
or pipe it to another application that reads it from stdin
or send it to dev/null and ignore it
store it in a string in-memory
 
@Crell I feel better about the implementation than I did three hours ago ...
 
I don't think the implementation is liked in the RFC yet?
 
11:11 PM
@JoeWatkins Yay!
@LeviMorrison There's no PR yet, technically, so I haven't linked it. Joe, are you OK with me making a PR of your branch for reference purposes? (Looks like there are merge conflicts at the moment either way.)
 
@CharlesSprayberry Ok thanks a lot for the explanation
 
@Crell I just wanted to look at it ^_^
 
00:00 - 20:0022:00 - 00:00

« first day (3838 days earlier)      last day (1100 days later) »