Skip to content

PHP: Add support for the pipe operator (|>) (v2 branch)#3954

Open
Ayesh wants to merge 1 commit intoPrismJS:v2from
Ayesh:php/v2-pipe-operator
Open

PHP: Add support for the pipe operator (|>) (v2 branch)#3954
Ayesh wants to merge 1 commit intoPrismJS:v2from
Ayesh:php/v2-pipe-operator

Conversation

@Ayesh
Copy link
Copy Markdown
Contributor

@Ayesh Ayesh commented May 29, 2025

Adds the |> symbol to the regexp that matches individual operators such as ??, ?=, ||, etc.

This PR is for the v2 branch; GH-3953 is for the master branch that cuts 1.x releases.

In PHP, | and > are operators too, but when combined, it is parsed as the new pipe operator.

Adds the `|>` symbol to the regexp that matches individual
operators such as `??`, `?=`, `||`, etc.

In PHP, `|` and `>` are operators too, but when combined, it is
parsed as the new pipe operator.

 - [RFC](http://wiki.php.net/rfc/pipe-operator-v3)
 - [PHP 8.5: Pipe operator](https://php.watch/versions/8.5/pipe-operator) (<- also a working demo of the changes)
@netlify
Copy link
Copy Markdown

netlify bot commented May 29, 2025

Deploy Preview for dev-prismjs-com ready!

Name Link
🔨 Latest commit 8b719e5
🔍 Latest deploy log https://app.netlify.com/projects/dev-prismjs-com/deploys/683892489e3ae80008612b3c
😎 Deploy Preview https://deploy-preview-3954--dev-prismjs-com.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

No JS Changes

Generated by 🚫 dangerJS against 8b719e5

@Ayesh Ayesh changed the title PHP: Add support for the pipe operator (|>) PHP: Add support for the pipe operator (|>) (v2 branch) May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant