Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126357 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id D44AA1A00BC for ; Sat, 8 Feb 2025 19:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1739044180; bh=6uwdv9RXz0xUstclu/Tntve/ZmZqbB2AexrUBvLjj18=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XydzZ+ju0LW+0Ln5kXddSexm+sSPf44hZa/kYSAPMvnwAHs867Geg2vfpUA6MJyQE Q0UguTEPV3V5YCYwZAib/dXMMcZX+n7qO/BpLnTf7kSoLnBHomGo3frpErEf/NY2Zs IBP/U7ywtSUAlSo2PqknHm5vgIDUFaD+MfnhVmJbAeJsA4gl8/NtqpgiUTuPJgif2M PGqjMCxADoF1nzAiKShRwEX78A8r6Tx88J4FYu1szCkhkFQncVYGzBo+fN5s8jXcYQ GnIY3YElTd/2pxM9tev7suWIaK3ccQ37VPa5K5q9FWIRjqu2nj8muDhzsM0e18K1sN tY9BEj2sKLIxQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B485180048 for ; Sat, 8 Feb 2025 19:49:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 8 Feb 2025 19:49:38 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-e455bf1f4d3so2426845276.2 for ; Sat, 08 Feb 2025 11:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739044342; x=1739649142; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6uwdv9RXz0xUstclu/Tntve/ZmZqbB2AexrUBvLjj18=; b=Uo78rDN7qL7AhA7jDf1oRp5qICohRMcQR6qOXQp+RM1OGrN1AL2l+pt9g300LG1FSd 5qYk6L+DmWIA6D3EbSyn5Q+BHwwY2UW3iexdXAEMyM790Fn0hpibVZqYpk2onUY7svT8 ENPHn4ZSQcCXAIaqoAelVXmUTxvjQy8Ggr0toQrZ9e0m6IODbkz5IRVRj04j+WmD6V6C rHH0qlhATApMOu6vV1ynH2M5NtNHt7iF4YXvgMT48IGLvWN/ZQ7x0JsMkf8om+wd8lvF DFAIFVDCYLaRrMI0CFLTuEiVlrCp02L0gjlwCyfw23Du1Zwp8p/pzJ0OQ8W8m0CPN6Ng hLcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739044342; x=1739649142; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6uwdv9RXz0xUstclu/Tntve/ZmZqbB2AexrUBvLjj18=; b=dAbgMxwjjKoJmtC8jrsYDQ8p/BGx3FmhIAXz3zeapA4nkjQhoOasam43VYOaoOeD9m V7Tlv6ZdTqxmZW09U+QwfmLAoVOW5r38ed0QzCZFBrGtYV28vOwr/KQmRKWaI+lCrWIu 1vXC/pZiMpPK59jZWvO378+QlZqdYlqFSQqm4l4RywAu69XEeOhXYS/vKuy84tvyUHLp zej60DkM0uXN7i6nLEtKxGQAR1lYtbKPULKWrgh9c55zL3tmu2wLa2KD0TBMWmtf0jYl JE0vhGSp6eBOuZdv4NDNqbm97GbSLiqUGHq92JbWeCpbHuyP2GuPigKDhZ6YN5yxPNQW UjdA== X-Forwarded-Encrypted: i=1; AJvYcCUGfN+UvjnE9j2t06qzefthhcmK5vGxofkbiBA1pTnp79UalmGY/+Akyhnib1Op+u4SnRU89IWWc3M=@lists.php.net X-Gm-Message-State: AOJu0YwE25mr5PI77BayTJyQuPDe0QxKdQ1vLK13Iuv/TbM16uxqqX/c QGiH2PHUm/fmseOq3bhqoztC4Z5zIpEMqEgwbsXJdvCHF/t2w2k6yYZgVL9JpWe8bs78X/rY4cv IMX+Yq8CVewLoaugtvG7y9/Pp+5g= X-Gm-Gg: ASbGncvNoFK9tjGXv31pDiiX8woMjXKlgWfn4opGbVumgRHX1OKfq0ibNhCTm85tCSY +qfylPD1F2zNhULli9E0azx8DVuX1HAVYM1G9Tst2dRzZK/TOa/V14hU9rcsDz/Vt9YuHJx4twx 0= X-Google-Smtp-Source: AGHT+IFaVoY88UCfRttvNzsQDf1j8ZJc+EyILK7hOvsxbzxnPOMtLlVwIliVB5ipoepRquzjL7Ol3jCHuWVRnMy/kO4= X-Received: by 2002:a05:6902:1ac5:b0:e58:a25c:2787 with SMTP id 3f1490d57ef6-e5b46268b1cmr6611437276.38.1739044342461; Sat, 08 Feb 2025 11:52:22 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <8053193b-0637-4db4-825d-56e7746111dd@bastelstu.be> <88486267-f5e5-485b-bce1-e30163b5e703@bastelstu.be> In-Reply-To: Date: Sat, 8 Feb 2025 21:52:11 +0200 X-Gm-Features: AWEUYZkhrXk75x_RTcRnaBJX-KpSqYibUeB28ZBa-Dy-qQjWS-LD0HMri2oWwz4 Message-ID: Subject: Re: [PHP-DEV] Introduction - Sam Lewis To: Sam Lewis Cc: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , Rob Landers , PHP Internals Content-Type: multipart/alternative; boundary="00000000000048010f062da6d078" From: zsidelnik@gmail.com (Eugene Sidelnyk) --00000000000048010f062da6d078 Content-Type: text/plain; charset="UTF-8" Hi Sam, Tim, Rob Maybe there could be another good feature to start with - the function to format bytes into a human-readable format (for debug purpuses) to have pretty view of the size (like 1.5GB, or 20MB) Right now every time I need this, I find myself copying the function from stack overflow, since PHP doesn't have any built-in solution: https://stackoverflow.com/questions/2510434/format-bytes-to-kilobytes-megabytes-gigabytes This is too little thing for having separate composer library, and perhaps having it built-in would be better? What do you think? --00000000000048010f062da6d078 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Sam, Tim, Rob

Maybe there could be another good feature to start with - the function= to format bytes into a human-readable format (for debug purpuses) to have = pretty view of the size (like 1.5GB, or 20MB)

Right now every time I need this, I find myself copyi= ng the function from stack overflow, since PHP doesn't have any built-i= n solution: https://stackoverflow.com/questions/= 2510434/format-bytes-to-kilobytes-megabytes-gigabytes

This is too little thing for having separ= ate composer library, and perhaps having it built-in would be better?
=

What do you think?
--00000000000048010f062da6d078--