Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129031 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 lists.php.net (Postfix) with ESMTPS id B890C1A00BC for ; Fri, 31 Oct 2025 16:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761928746; bh=u2dGuXIrWgMCkfMPuI+kz6KYO/cLrem+YupHLbMDbEo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TQcr6/LyDPFIZ3xUvLI0ZtguDqv6KiZSeDqFJsFmGG6Me60C/kRaehP2DoZQATEqw mf649JkEDIxWeu9AFCn6l5dVXDUM7VRElfCr9zM0YklVUCQzlLfoURonCiQOo73esa H1c/jvx+ryQGjQSx4RyXEmdZ/V2wGm3nqCauKVYzx/aUw1ZR2EO8F/of+GoUS73VuY mvwCtRELDOjfi3YjgvgE9AGT4/tP9cB46I0BbtDnBRgw970uIGG5ch0OQ0Rtvw9d1w cS/+1BcjBbQIAGYUHNu93GWFRFFMJNRx0obd/DE6LJSSFc1jL3q51aJp3PQRZAYQkv faYMcyVcqdQmg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 877E6180032 for ; Fri, 31 Oct 2025 16:39:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) (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 ; Fri, 31 Oct 2025 16:39:02 +0000 (UTC) Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-89018e97232so923891241.0 for ; Fri, 31 Oct 2025 09:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761928736; x=1762533536; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=u2dGuXIrWgMCkfMPuI+kz6KYO/cLrem+YupHLbMDbEo=; b=Xf0u0BMv8yKrGy6AAYZZs3lQr7hPxMRwbbXrWqeP9j/3t7BISSOCoZVi8w7IzEd23H cWs+exPjiukzJjn/9v03hJEg9gzshj8AI5/6ViLRKKVzjnfiua8UmF0rgEP2+FhfRC0j QEQNZDqwYwLihvaRNNYOFKiiL/+B0IoZqmmnv8avYgXUj6V2jewhQ+HLZZ067ZTjBZmA 7CG/oDYHtFeQmzYzY24BT6DyuAeTjlXSvRjoLUk6SQDR9we/fwazCDfaT+cu2N52wSCd Hr4ixU9ki8tyox1N2c1wDLvn7+8qD1CYi3UoUIWfNAvrlKOyyTesLNTfUmChAxrW+FcY 3k0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761928736; x=1762533536; h=content-transfer-encoding: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=u2dGuXIrWgMCkfMPuI+kz6KYO/cLrem+YupHLbMDbEo=; b=ESRGv240A1dk5vPeEjzeTIRhf2LCyeucAIObu0cVgDtxKGuZrJMY39MlA69UBcxBUr M6JBV4ME5N+xC8j9ZpZklFsWNNo2PzYk3LSPV+BSE6SPvMhQ4ePpbdxvOQ5VHlTx81eK l0FomT1tsNoTRm9WKpZf63FpqYDVdNrI9kd3OAm9UE7Irft9zkIdGuE2tDqUDnUdW8f1 /24qYYuz4aGaXAKaUIzmoq2r3uVI/uOJhNgCYgt42hGQz89c1wUix/8D1g8cbk1HEljf vvX0rQKA5Hu5yXA8nyfRWTjm5J445UE3jBcuyYQqmbZb7qjXFoctFv3QbCIkOCRjhd5z G+cA== X-Gm-Message-State: AOJu0YxPEdDNaHC+Z//E0mrMzD+4B3JwudJ/fH7vTVmePggfay96SDZh +qmkBqbrATlCtaXt5M4gA9hXu/G9Z5g5EzvZjE9ZOLLc9BiZbQcOnog21NIcwS8poOymsg/U5dm AGl/YhuRIEKmvMstyPyi5i24oKADrWLknGGQ9gcE= X-Gm-Gg: ASbGncsF/Qzs9GaAEyvxO+vAPpFzaYbhJjZOZYvHLOKirKE75YKFJAyKvn75wUcN9sU rTqltF/40QOiKIQh9W0RjjFZZVfCEoUhy7AX57yE8NIFiWxrWW7/V4Rauznuet5XrR5DER50KwW fb6swkuv/PK0IZDWSEsGu0OFuXdHTWxXODrk5EsewEF7a14O6/7+RaSM6GLF2FAAWpeQZWxNzNZ tvkUWUsYlJw8BTTeramnQFMLdl34/13MfpeHgtN7GqCIFpKbt+FRjTrLsAXkDwkd16sKxeVU1PN EhfiJGoqVEOTX7Zv X-Google-Smtp-Source: AGHT+IEA272tAj0Nk0lGlMbtBIA6vbvT6PK1V67R1/hhrnNUWqc2wcwTT2RRcYTP9JIW8ctezp5xI4qtkYsB5nIy3os= X-Received: by 2002:a05:6102:442c:b0:5db:3bbf:8e62 with SMTP id ada2fe7eead31-5dbb11f0c91mr1382303137.1.1761928736515; Fri, 31 Oct 2025 09:38:56 -0700 (PDT) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 31 Oct 2025 18:38:45 +0200 X-Gm-Features: AWmQ_bkDGt30gB_LSwV4np2L70W3d2Dbr44X7irldYJJ3hQlQt_MTllOC_oYdmM Message-ID: Subject: Re: [PHP-DEV] Fwd: [DISCUSSION] Proposal: Official PHP Language Server (LSP Implementation) To: Dan Jessen Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: edmond.ht@gmail.com (Edmond Dantes) Hello. Great idea. > The PHP runtime already provides components that could serve as a foundat= ion =E2=80=94 e.g. php -l for syntax checking, reflection APIs, AST via php= -ast, and insights from static analysis tools > like Psalm or PHPStan. At the moment, PHP has several static analyzers. But what would be really great is the ability to extend and combine them =E2=80=94 for example, having a separate module that determines the da= ta type of a variable. That component would be invaluable and could be reused for various purposes, not just within LSP. In JavaScript, the equivalent of such a =E2=80=9Cring of power=E2=80=9D was= the Babel project, which allowed manipulating the AST and writing custom plugins. I think PHP could benefit greatly if such a tool were built as a standard for AST analysis, allowing small plugins to be created for it with minimal effort. --- Ed