PHP

The PHP badge, lettered “Elephants Never Forget · Since 1995” round its band
Files
.php .phtml
Formats as
Ur
Lints
Every rule that reads its code
In ur.toml
[format.php]

Formatted

cart.php, as written
<?php
// What a cart costs.
function subtotal(array $items):int{$sum=0;foreach($items as $item){$sum+=$item['price']*$item['quantity'];}return $sum;}
function label(array $item):string{return $item['name'].' x'.$item['quantity'];}
ur format --style ur cart.php
<?php
// What a cart costs.
function subtotal(array $items):int{$sum=0; foreach($items as $item){$sum+=$item['price']*$item['quantity']; }return $sum; }
function label(array $item):string{return $item['name'].' x'.$item['quantity']; }

Try it in the playground →

Versions

Ur reads PHP as the profiles below name it. Name the versions a project targets in target; without it, Ur reads php-8.5.

ProfileDialect
php-7.4Zend
php-8.0Zend
php-8.1Zend
php-8.2Zend
php-8.3Zend
php-8.4Zend
php-8.5Zend