PHP 8.5 Feature Demo

PHP Version: 8.5.1

1. Pipe Operator

Old method: hello php 8.5

2. array_first() & array_last()

First (old): 10, Last (old): 50

First (PHP 8.5): 10, Last (PHP 8.5): 50

First user: Alice

Last user: Charlie

3. Closures in Constants

Processing: Processed: Test

4. URI Extension

parse_url():
Array
(
    [scheme] => https
    [host] => example.com
    [path] => /path/../newpath
    [query] => query=test
    [fragment] => fragment
)

Host: example.com

Path: /newpath

5. Clone With (Property Modification)

Original: Martin, Age: 42

Updated: Martin, Age: 43

System Info

PHP Version: 8.5.1
Server: Caddy/v2.10.2Date: 2026-01-05 01:34:22