Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-09 Thread Григорий Senior PHP / Разработчик Web
> I've worked on PHP (and non-PHP) applications with (tens of) millions of lines of code Grats, you're a hero. Now, you're a hero. You can solve the application in your paper notebook. That does not explain why computers should know some correctness and not help you, because you're a hero. I now

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-09 Thread Robert Landers
On Thu, Feb 8, 2024 at 8:57 PM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > 1. Do some benchmark with > > ``` > > function a($a, $b) > { > return $a + $b; > } > > function aa($a, $b) > { > throw new \Exception(); > > return $a + $b; > } > > $bag = []; > > $mt

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Григорий Senior PHP / Разработчик Web
1. Do some benchmark with ```

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Григорий Senior PHP / Разработчик Web
>From that point of view you're absolutely correct. I want to use json_last_error() with global state, but with the ability to manually change the state size to prevent memory overflow. So I suggested it because the count of bad code will grow in arithmetic progression because of the times on the

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Larry Garfield
On Thu, Feb 8, 2024, at 11:15 AM, Григорий Senior PHP / Разработчик Web wrote: > Just because PHPStan is a ready solution for design errors that you can > predict. > My case is about errors that you detect later, after the design is > finished, PHPStan shows you that "all done!". > > Because it's n

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Григорий Senior PHP / Разработчик Web
Just because PHPStan is a ready solution for design errors that you can predict. My case is about errors that you detect later, after the design is finished, PHPStan shows you that "all done!". Because it's not \LogicExceptions (types, mappings), it's all \RuntimeExceptions... You have to implemen

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Arvids Godjuks
On Thu, Feb 8, 2024, 12:12 Alexander Pravdin wrote: > On Thu, Feb 8, 2024 at 6:25 PM Григорий Senior PHP / Разработчик Web > <6562...@gmail.com> wrote: > > > > PHPStan is out the case. > > > > May I know why is it out? > > I'm actively using it in my projects and it helps me a lot to not > relax

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Alexander Pravdin
On Thu, Feb 8, 2024 at 6:25 PM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > PHPStan is out the case. > May I know why is it out? I'm actively using it in my projects and it helps me a lot to not relax and write safe code. It also helps a lot in cleaning up legacy code. Som

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Григорий Senior PHP / Разработчик Web
Ok, I understand your position. Want explanations about personal behavior - please write by telegram. PHPStan is out the case. SOLID is not a marker of good architecture, it's a marker of idealistic understanding, for me. I already long ago passed that time where I can just say "this code is bad

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-08 Thread Alexander Pravdin
On Thu, Feb 8, 2024 at 4:02 PM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > JIT I've had this solved, not only the application, but a way to. > > Am sharing my experience without labels "bad", "cood", "truth" or "correct", > like you did. > > Your arguments are based on you

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
JIT I've had this solved, not only the application, but a way to. Am sharing my experience without labels "bad", "cood", "truth" or "correct", like you did. Your arguments are based on your principles and I don't see in your words any point to discuss, so - use pm or share here secret of error-fr

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Alexander Pravdin
On Thu, Feb 8, 2024 at 2:29 AM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > I still don't understand why the problem is signature and moving a simple > throw statement to return type, and then rewriting the catch statement to > oneline-r. Sorry for answering not directly to

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
I still don't understand why the problem is signature and moving a simple throw statement to return type, and then rewriting the catch statement to oneline-r. I am completely satisfied with the php way of working with method signatures except non-critical cases: - still no `undefined` type, so som

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Larry Garfield
On Wed, Feb 7, 2024, at 12:55 AM, Alex Wells wrote: > On Tue, Feb 6, 2024 at 7:14 PM Larry Garfield > wrote: > >> These two samples *are logically identical*, and even have mostly the same >> performance characteristics, and both expose useful data to static >> analyzers. They're just spelled dif

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
As I mentioned above - javascript pipelines (named `Promise` and `Thenable`) are great examples when exceptions are a bad choice. Btw, not "bad", but "choice to stop one step of the chain only". If any step of chain/foreach throws an exception - it will break all code. Should break one step. That'

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
Analyzing the problem on a single level operation is incorrect. New code and simple operations are fully covered with exception/try/catch flow. The main point i tried to attract your attention is that if you working in batches/queues/pipelines you still need errors collection, and if you made erro

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Larry Garfield
On Wed, Feb 7, 2024, at 10:21 AM, Robert Landers wrote: >> I think there's a subtle but important difference here between what you're >> describing as the problem and what you implied the solution was (which I >> then ran with). >> >> What you're talking about is trying to change the error hand

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Robert Landers
On Wed, Feb 7, 2024 at 11:27 AM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > Yes, that was the second build of the error bag I presented in the github > ticket. > First one was a Trait that added an error bag as property in class and > returned an array with two results. >

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Григорий Senior PHP / Разработчик Web
Yes, that was the second build of the error bag I presented in the github ticket. First one was a Trait that added an error bag as property in class and returned an array with two results. The trouble was you have to refactor all places you used your function doesn't matter, want you or not. And

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-07 Thread Robert Landers
On Tue, Feb 6, 2024 at 9:22 PM Larry Garfield wrote: > > On Tue, Feb 6, 2024, at 7:56 PM, Григорий Senior PHP / Разработчик Web wrote: > > Thanks Larry, I will read both articles next weekend. > > > > Am not even talking about changing `throw` to `raise`. > > > > Am talking only about: > > - produ

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Thanks for suggestion about assert() use cases, i know it exists before, but never used. Usually if something shouldn't happen i throw exception there, or at least type control. Its like manual mark for the future - you doing something wrong, fix it. Error collection case its about "you're right,

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Alex Wells
On Tue, Feb 6, 2024 at 7:14 PM Larry Garfield wrote: > These two samples *are logically identical*, and even have mostly the same > performance characteristics, and both expose useful data to static > analyzers. They're just spelled differently. The advantage of the second > is that it could be

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Weedpacket
On 2024-02-07 09:08, Larry Garfield wrote: "The right tool for the job" is indeed the strongest argument for lightweight exceptions. It's a tool we lack right now. I'm thinking not of "DB went away" type issues (Exceptions are already fine there), but "requested product not found." Right no

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Larry Garfield
On Tue, Feb 6, 2024, at 7:56 PM, Григорий Senior PHP / Разработчик Web wrote: > Thanks Larry, I will read both articles next weekend. > > Am not even talking about changing `throw` to `raise`. > > Am talking only about: > - production ready code > - that should be able to refactor with error collec

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Arvids Godjuks
On Tue, 6 Feb 2024 at 22:09, Larry Garfield wrote: > On Tue, Feb 6, 2024, at 7:18 PM, Arvids Godjuks wrote: > > >> To be clear: I really like this concept and have discussed it with > others > >> before, using almost exactly this syntax. I have not proposed it > because > >> my read of Internals

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Larry Garfield
On Tue, Feb 6, 2024, at 7:18 PM, Arvids Godjuks wrote: >> To be clear: I really like this concept and have discussed it with others >> before, using almost exactly this syntax. I have not proposed it because >> my read of Internals lately is that there's no stomach for more >> type-centric behavi

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Thanks Larry, I will read both articles next weekend. Am not even talking about changing `throw` to `raise`. Am talking only about: - production ready code - that should be able to refactor with error collectors (that was not implemented years ago) - without touching return types - without touchi

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Jordan LeDoux
On Tue, Feb 6, 2024 at 11:19 AM Arvids Godjuks wrote: > On Tue, 6 Feb 2024 at 19:14, Larry Garfield > wrote: > > Thank you Larry for this interesting summary - didn't remember there was > quite a bit a discussion around the topic prior. > > I lean on the "we have exceptions, just leave it be" si

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Arvids Godjuks
On Tue, 6 Feb 2024 at 19:14, Larry Garfield wrote: > On Tue, Feb 6, 2024, at 4:13 PM, Григорий Senior PHP / Разработчик Web > wrote: > > Btw, i agree about Javascript, but on a low level it produces the most > > clean code, because there's no types and rules. All types moved to > > TypeScript's c

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Larry Garfield
On Tue, Feb 6, 2024, at 4:13 PM, Григорий Senior PHP / Разработчик Web wrote: > Btw, i agree about Javascript, but on a low level it produces the most > clean code, because there's no types and rules. All types moved to > TypeScript's client side compiler. > > JS 15 years ago ACCIDENTALLY created a

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Btw, i agree about Javascript, but on a low level it produces the most clean code, because there's no types and rules. All types moved to TypeScript's client side compiler. JS 15 years ago ACCIDENTALLY created a pipeline. Named it "Promise". We spent years after to understand that while (true) and

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
My function seems like this: ``` _error_bag_error(error) { if (stack.errorBag) { stack.errorBag.add(error); } } ``` It does nothing if i didn't initialize the error bag manually. I should call _error_bag() inside the current function to create one in the stack, or _error_bag_push() (and

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Arvids Godjuks
JavaScript is JavaScript - it's not a good role model to look at. If anything, JavaScript is a collection of things of how not to design a language :) What you are looking for is Golang. The level of changes you are proposing require it to go thriugh an RFC process, have 2/3rds of voters to agree

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Javascript is closer to. It allows you to throw anything, but it is still the throw statement, keeping in the mind the async nature of js - memory and processor stuff is shared by the time. JS seniors usually hate those guys who throw anything except language Error class because they skipped the

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Robert Landers
On Tue, Feb 6, 2024 at 4:26 PM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > Short answer is yes. Glad to see that personally adapted answer. > > That's why in the relevant github issue i show how to collect ONLY if you > need. > If you initialize the error bag - it collects,

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Alex Wells
On Tue, Feb 6, 2024 at 5:26 PM Григорий Senior PHP / Разработчик Web < 6562...@gmail.com> wrote: > Short answer is yes. Glad to see that personally adapted answer. > What are those languages specifically?

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Alex Wells
On Tue, Feb 6, 2024 at 3:58 PM Григорий Senior PHP / Разработчик Web < 6562...@gmail.com> wrote: > - add non-breakable interface and language construct `raise` to "throw" > error without collecting trace > - that error could be any scalar or object, or you can implement new > interface for them, k

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Short answer is yes. Glad to see that personally adapted answer. That's why in the relevant github issue i show how to collect ONLY if you need. If you initialize the error bag - it collects, if not - it skips. T So the `try/catch` statement outside means you initialized, also a special decorator

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Alexander Pravdin
On Wed, Feb 7, 2024 at 12:00 AM Григорий Senior PHP / Разработчик Web <6562...@gmail.com> wrote: > > Sending you private emails made because "answer" button in Gmail selects > only you to receive. > Sending you private emails that don't even read signs to me you don't need > my answers and have no

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Sending you private emails made because "answer" button in Gmail selects only you to receive. Sending you private emails that don't even read signs to me you don't need my answers and have no benefits from reading. But you deny, dont even want to understand. And notify all subscribers about what yo

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Arvids Godjuks
On Tue, 6 Feb 2024 at 16:39, Arvids Godjuks wrote: > > > On Tue, 6 Feb 2024 at 15:58, Григорий Senior PHP / Разработчик Web < > 6562...@gmail.com> wrote: > >> Hello, please discuss about error collecting implementation in next PHP >> releases >> >> Exceptions have common differences that restrict

Re: [PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Arvids Godjuks
On Tue, 6 Feb 2024 at 15:58, Григорий Senior PHP / Разработчик Web < 6562...@gmail.com> wrote: > Hello, please discuss about error collecting implementation in next PHP > releases > > Exceptions have common differences that restrict using them to collect > errors > 1. Timeloss (trace collection) o

[PHP-DEV] Feature request: https://github.com/php/php-src/issues/13301

2024-02-06 Thread Григорий Senior PHP / Разработчик Web
Hello, please discuss about error collecting implementation in next PHP releases Exceptions have common differences that restrict using them to collect errors 1. Timeloss (trace collection) on call new() on any class that implements \Throwable 2. To collect errors and return it to the upper level

Re: [PHP-DEV] Feature Request: dependencies container

2020-08-02 Thread Marco Pivetta
Re-writing with the internals ML in CC On Mon, Aug 3, 2020, 06:16 3u93n3 wrote: > > 2. Setter injection (as well as property injection, and also the > proposed `__inject`) leads to temporal coupling smells. Explained > otherwise, your object instances are not "functioning" right after > instanti

Re: [PHP-DEV] Feature Request: dependencies container

2020-08-02 Thread Marco Pivetta
Heya, On Mon, Aug 3, 2020, 05:32 3u93n3 wrote: > The main idea is to take control over objects creation and injecting > dependencies. > > 1. Some of them are provided through constructor (those, which could only > be retrieved right before instantiating our object). > 2. Others are provided thro

[PHP-DEV] Feature Request: dependencies container

2020-08-02 Thread 3u93n3
The main idea is to take control over objects creation and injecting dependencies. 1. Some of them are provided through constructor (those, which could only be retrieved right before instantiating our object). 2. Others are provided through `__inject` and PHP will inject all those dependencies aut

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-30 Thread Nikita Popov
On Sun, Mar 29, 2020 at 12:07 AM Michael Voříšek - ČVUT FEL < voris...@fel.cvut.cz> wrote: > Hi all PHP gurus! > > This is a feature request / RFC for the following use-case: > > $res = []; > foreach ($arr as $i) { > foreach (make_res($i) as $v) { > $res[] = $v; > } > } > > Array_merge in loop is

RE: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-29 Thread Iván Arias
>> $arr[] = 1, 2, 3; // push these 3 values >> $arr[] = 1, 2, ... [3, 4, 5], 6; // push these 6 values > >Just to play with this... - normally an assignment evaluates to the >value being assigned: > >var_dump($arr[] = 1); // int(1) > >What would this produce? > >var_dump($arr[] = 1, 2, 3); > >The f

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-29 Thread Jakob Givoni
On Sun, Mar 29, 2020 at 4:08 AM Iván Arias wrote: > > $arr[] = 1, 2, 3; // push these 3 values > $arr[] = 1, 2, ... [3, 4, 5], 6; // push these 6 values Just to play with this... - normally an assignment evaluates to the value being assigned: var_dump($arr[] = 1); // int(1) What would this prod

Re: [PHP-DEV] Feature request - allow to append multiple elementsto an array

2020-03-29 Thread Christoph M. Becker
On 29.03.2020 at 21:05, Manuel Canga wrote: > Maybe, PHP needs array_flatten like Ruby: > https://apidock.com/ruby/Array/flatten > > In this way, above code would be equal to: > > $res = array_flatten( array_map('make_res', $arr) ); You can already do $res = array_merge(...array_map('make_re

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-29 Thread Manuel Canga
Hi, Internals > > Em sáb., 28 de mar. de 2020 às 20:07, Michael Voříšek - ČVUT FEL < > voris...@fel.cvut.cz> escreveu: > > > Hi all PHP gurus! > > > > This is a feature request / RFC for the following use-case: > > > > $res = []; > > foreach ($arr as $i) { > > foreach (make_res($i) a

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-29 Thread Iván Arias
lt;https://aka.ms/ghei36> From: David Rodrigues Sent: Sunday, March 29, 2020 5:32:32 AM To: Michael Voříšek - ČVUT FEL Cc: PHP Internals Subject: Re: [PHP-DEV] Feature request - allow to append multiple elements to an array I think it useful, despite that it co

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-28 Thread David Rodrigues
I think it useful, despite that it could be done by using array_push() as Woortmann said. Anyway, I think valid a new proposal for thinks like that. But I will suggests this: $arr[] = ... $items; Atenciosamente, David Rodrigues Em sáb., 28 de mar. de 2020 às 20:07, Michael Voříšek - ČVUT FEL

Re: [PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-28 Thread Enno Woortmann
Hi Michael, why not simply use array_push with multiple arguments? Something like: $a = []; array_push($a, ...array_fill(0, 10, 'x')); echo print_r($a, true); Cheers, Enno Am 29.03.2020 um 00:07 schrieb Michael Voříšek - ČVUT FEL: Hi all PHP gurus! This is a feature request / RFC for the foll

[PHP-DEV] Feature request - allow to append multiple elements to an array

2020-03-28 Thread Michael Voříšek - ČVUT FEL
Hi all PHP gurus! This is a feature request / RFC for the following use-case: $res = []; foreach ($arr as $i) { foreach (make_res($i) as $v) { $res[] = $v; } } Array_merge in loop is very sloop so it is not a solution. which I propose to shorten to: $res = []; foreach ($arr as $i) { $re

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Ryan Pallas
6:21 >> >À : Pascal KISSIAN >> >Cc : internals@lists.php.net >> >Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction >> > >> >On 2016-10-04 14:33, Pascal KISSIAN wrote: >> >> I have an application where a small file is included at mult

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Ryan Pallas
On Tue, Oct 4, 2016 at 8:33 AM, Pascal KISSIAN wrote: > >-Message d'origine- > >De : Lauri Kenttä [mailto:lauri.ken...@gmail.com] > >Envoyé : mardi 4 octobre 2016 16:21 > >À : Pascal KISSIAN > >Cc : internals@lists.php.net > >Objet : Re:

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Thomas Nunninger
Hi, On 10/04/2016 01:33 PM, Pascal KISSIAN wrote: Hi everybody, I have an application where a small file is included at multiple places. So far so good. The problem is that this include consists in a small piece of code which is inside a multi-level loop. The include is done about an a

[PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Michael Morris
On Tuesday, October 4, 2016, Pascal KISSIAN > wrote: > « tell me what you need, and I would tell you how to do without it » is a > nonsense answer for me… > > > > I just told you about one among several cases where I found the need for > such a feature. > > > And you've been told that functions an

RE: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Pascal KISSIAN
] Envoyé : mardi 4 octobre 2016 17:52 À : Bob Weinand Cc : Pascal KISSIAN; PHP internals list Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction 2016-10-04 17:39 GMT+02:00 Bob Weinand : > Am 4.10.2016 um 16:33 schrieb Pascal KISSIAN : > >> -Message d'o

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Michał Brzuchalski
al KISSIAN > >> Cc : internals@lists.php.net > >> Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction > >> > >> On 2016-10-04 14:33, Pascal KISSIAN wrote: > >>> I have an application where a small file is included at multiple > >>

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Bob Weinand
> Am 4.10.2016 um 16:33 schrieb Pascal KISSIAN : > >> -Message d'origine- >> De : Lauri Kenttä [mailto:lauri.ken...@gmail.com] >> Envoyé : mardi 4 octobre 2016 16:21 >> À : Pascal KISSIAN >> Cc : internals@lists.php.net >> Objet

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Thomas Hruska
On 10/4/2016 7:33 AM, Pascal KISSIAN wrote: -Message d'origine- De : Lauri Kenttä [mailto:lauri.ken...@gmail.com] Envoyé : mardi 4 octobre 2016 16:21 À : Pascal KISSIAN Cc : internals@lists.php.net Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction On 2016-10-04

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Thomas Hruska
On 10/4/2016 4:33 AM, Pascal KISSIAN wrote: Hi everybody, I have an application where a small file is included at multiple places. So far so good. The problem is that this include consists in a small piece of code which is inside a multi-level loop. The include is done about an average of 100

RE: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Pascal KISSIAN
>-Message d'origine- >De : Lauri Kenttä [mailto:lauri.ken...@gmail.com] >Envoyé : mardi 4 octobre 2016 16:21 >À : Pascal KISSIAN >Cc : internals@lists.php.net >Objet : Re: [PHP-DEV] Feature Request: inline pseudo-instruction > >On 2016-10-04 14:33, Pasca

Re: [PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Lauri Kenttä
On 2016-10-04 14:33, Pascal KISSIAN wrote: I have an application where a small file is included at multiple places. The include is done about an average of 100.000 times . I'm just wondering if you have ever heard of functions? You really should write a function, include it only once, and th

[PHP-DEV] Feature Request: inline pseudo-instruction

2016-10-04 Thread Pascal KISSIAN
Hi everybody, I have an application where a small file is included at multiple places. So far so good. The problem is that this include consists in a small piece of code which is inside a multi-level loop. The include is done about an average of 100.000 times . When I manually rep

Re: [PHP-DEV] feature-request : html + css logging in apache logs (example for the rest of the unix community too)

2016-08-27 Thread Rene Veerman
Thank you. I'm not insisting it become the default, just thought it'd be handy.. As for the RFC, i'll do it after a nice long nap OK :) I dont know anything about the internals of PHP, i'm a PHP + HTML developer exclusively, but i'll try to give you some implementation suggestions in what i can m

Re: [PHP-DEV] feature-request : html + css logging in apache logs (example for the rest of the unix community too)

2016-08-27 Thread Kalle Sommer Nielsen
Hi 2016-08-28 5:07 GMT+02:00 Rene Veerman : > > it would really cut my development time in more than half if you could add > "all of this" (it's deadsimple and a few hours work imo) to the next > versions of PHP (and please make it the default, you can include sample CSS > or read in a CSS file

[PHP-DEV] feature-request : html + css logging in apache logs (example for the rest of the unix community too)

2016-08-27 Thread Rene Veerman
Hi. Once again, thanks for keeping PHP free to use and so widely and easily installed.. I have another feature request (sent earlier tonight).. I quite often, much more than i like, *need* a stacktrace and *proper* variable listings for each function called in PHP when it barfs out nothing more

Re: [PHP-DEV] feature request : gzip caching

2016-08-27 Thread Rene Veerman
i'm working on comprehensive caching (and true obfuscation) with PHP for HTML, CSS, JS and JSON.. it's nearly done, and i've always served my javascript as a concatenated file.. i have well over 20 different sourcefiles you know.. takes too long with the http overhead for them to be in seperate req

[PHP-DEV] feature request : gzip caching

2016-08-27 Thread Rene Veerman
Hi.. First off, i love PHP. Many thanks for keeping it free too. However, i've noticed that gzipping the 1Mb of javascript that my seductiveapps.com needs, takes a relatively long time (measured over a total page load time which i'd like to bring down from it's current 10 seconds, about a second

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 19:05, Rowan Collins a écrit : On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key => $element) {

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 15:45, Grégory Planchat wrote: class BarSortable implements Sorter { public function sort(Sortable $collection) { $previousKey = null; $previousElement = null; foreach ($collection as $key => $element) { if ($previousKey === null) {

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 08/03/2015 15:19, Rowan Collins a écrit : On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feat

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Rowan Collins
On 08/03/2015 10:51, Grégory Planchat wrote: Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https:

Re: [PHP-DEV] Feature request and RFC

2015-03-08 Thread Grégory Planchat
Le 24/02/2015 20:20, Thomas Gielfeldt a écrit : 2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possibl

Re: [PHP-DEV] Feature request and RFC

2015-02-27 Thread Rowan Collins
Thomas Gielfeldt wrote on 24/02/2015 16:17: Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting on. I think the reason t

Re: [PHP-DEV] Feature request and RFC

2015-02-26 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > wrote: > >> Hi internals. >> >> I've made PR proposing a feature request: A new interface Sortable. >> >> https://github.com/php/php-src/pull/1116 >> >> If possible, I would like to create

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > wrote: > >> Hi internals. >> >> I've made PR proposing a feature request: A new interface Sortable. >> >> https://github.com/php/php-src/pull/1116 >> >> If possible, I would like to create

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 12:15 GMT+01:00 Alexander Lisachenko : > > 2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt : > >> Yeah, but the "problem" with this, is that your class' sort method, you >> have to implement all the possible permutations the flags can produce. This >> basically just squeezes the 11 function

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:37 GMT+03:00 Thomas Gielfeldt : > Yeah, but the "problem" with this, is that your class' sort method, you > have to implement all the possible permutations the flags can produce. This > basically just squeezes the 11 functions into 1. The 1 interface with > sort() and usort() splits

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-25 11:31 GMT+01:00 Alexander Lisachenko : > > 2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt : > >> I have some more proposals for how to implement this interface. Should we >> create an RFC for purposes of discussion, or do you usually do this in the >> mailing lists? >> > > > Best interface

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Alexander Lisachenko
2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt : > I have some more proposals for how to implement this interface. Should we > create an RFC for purposes of discussion, or do you usually do this in the > mailing lists? > Best interface is described by the one single method: sort() that accepts opti

Re: [PHP-DEV] Feature request and RFC

2015-02-25 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > wrote: > >> Hi internals. >> >> I've made PR proposing a feature request: A new interface Sortable. >> >> https://github.com/php/php-src/pull/1116 >> >> If possible, I would like to create

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 20:49 GMT+01:00 Stanislav Malyshev : > Hi! > > > I've made PR proposing a feature request: A new interface Sortable. > > > > https://github.com/php/php-src/pull/1116 > > > > If possible, I would like to create and RFC describing this in more > detail, > > and perhaps get a voting on. >

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Stanislav Malyshev
Hi! > I've made PR proposing a feature request: A new interface Sortable. > > https://github.com/php/php-src/pull/1116 > > If possible, I would like to create and RFC describing this in more detail, > and perhaps get a voting on. Can't you sort any class that provides ordered list of elements a

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
2015-02-24 17:36 GMT+01:00 Benjamin Eberlei : > Hi, > > On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt > wrote: > >> Hi internals. >> >> I've made PR proposing a feature request: A new interface Sortable. >> >> https://github.com/php/php-src/pull/1116 >> >> If possible, I would like to create

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Benjamin Eberlei
Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: > Hi internals. > > I've made PR proposing a feature request: A new interface Sortable. > > https://github.com/php/php-src/pull/1116 > > If possible, I would like to create and RFC describing this in more detail, > and perhaps get a vo

[PHP-DEV] Feature request and RFC

2015-02-24 Thread Thomas Gielfeldt
Hi internals. I've made PR proposing a feature request: A new interface Sortable. https://github.com/php/php-src/pull/1116 If possible, I would like to create and RFC describing this in more detail, and perhaps get a voting on. Thanks Br, Thomas Gielfeldt

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Rasmus Lerdorf
On 03/14/2013 09:13 AM, Bob Weinand wrote: > And there is no possibility to store the zval as raw binary data like in > memory (deep copy?) > So that you only have to copy from ram? And replace the pointers to the place > in the string? > This must be possible I think. And should be faster. > >

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Larry Garfield
On 3/14/13 12:28 PM, Bob Weinand wrote: Am 14.3.2013 um 18:14 schrieb Rasmus Lerdorf : On 03/14/2013 09:13 AM, Bob Weinand wrote: And there is no possibility to store the zval as raw binary data like in memory (deep copy?) So that you only have to copy from ram? And replace the pointers to th

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Bob Weinand
Am 14.3.2013 um 18:14 schrieb Rasmus Lerdorf : > On 03/14/2013 09:13 AM, Bob Weinand wrote: >> And there is no possibility to store the zval as raw binary data like in >> memory (deep copy?) >> So that you only have to copy from ram? And replace the pointers to the >> place in the string? >> Thi

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Bob Weinand
Am 14.3.2013 um 16:46 schrieb Lazare Inepologlou : > Hello, > > 2013/3/14 rene7705 > >> great! :) >> >> this will do nicely. is there much overhead for storing and fetching these >> variables? (ideally I would like to get a pointer) >> >> > Unfortunately there is. Every object stored in APC

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Steve Clay
On 3/14/13 10:31 AM, rene7705 wrote: (ideally I would like to get a pointer) PHP's environment is torn down after every request, so no matter what the mechanism you generally can't store anything that can't be serialized. See also https://www.google.com/search?q=php+shared+memory Steve Clay

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Lazare Inepologlou
Hello, 2013/3/14 rene7705 > great! :) > > this will do nicely. is there much overhead for storing and fetching these > variables? (ideally I would like to get a pointer) > > Unfortunately there is. Every object stored in APC has to be serialised first and then unserialised on retrieval. You can

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread rene7705
great! :) this will do nicely. is there much overhead for storing and fetching these variables? (ideally I would like to get a pointer) On Thu, Mar 14, 2013 at 12:45 PM, Nikita Nefedov wrote: > On Thu, 14 Mar 2013 07:05:03 -, rene7705 wrote: > > Hi. >> >> I'd like to build a replacement

Re: [PHP-DEV] feature request : easy shared memory

2013-03-14 Thread Nikita Nefedov
On Thu, 14 Mar 2013 07:05:03 -, rene7705 wrote: Hi. I'd like to build a replacement for SQL (yes, talk about an ambitious project! ;), because the constant transferal of data in and out of SQL from Javascript (where everything might as well be object-oriented and hierarchial) is a pain

[PHP-DEV] feature request : easy shared memory

2013-03-14 Thread rene7705
Hi. I'd like to build a replacement for SQL (yes, talk about an ambitious project! ;), because the constant transferal of data in and out of SQL from Javascript (where everything might as well be object-oriented and hierarchial) is a pain in the neck. But in order to do so, I'd very much like PHP

Re: [PHP-DEV] Feature Request

2012-01-04 Thread Ángel González
On 04/01/12 17:18, Keloran wrote: which can if your doing lots of checking alot of extra code for no reason, or if you want to use variables, lots of louse variables just for something that could be pulled from the request I don't think it would mean 'a lot of code', but if it bothers you in yo

  1   2   >