3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SomeAction { public function __construct( public ?string $powerOfAttorneyDate = null { set => $value === '' ? null : $value; }, ) { } } $data = new SomeAction('2025-01-01'); echo "powerOfAttorneyDate is included when printing the obj:\n"; echo print_r($data, true); echo "powerOfAttorneyDate is missing (bug) when using get_object_vars:\n"; echo print_r(\get_object_vars($data), true); echo "powerOfAttorneyDate is included when using foreach on the object:\n"; foreach ($data as $name => $value) { echo $name . ' => ' . $value; }
Output for git.master_jit, git.master
powerOfAttorneyDate is included when printing the obj: SomeAction Object ( [powerOfAttorneyDate] => 2025-01-01 ) powerOfAttorneyDate is missing (bug) when using get_object_vars: Array ( [powerOfAttorneyDate] => 2025-01-01 ) powerOfAttorneyDate is included when using foreach on the object: powerOfAttorneyDate => 2025-01-01

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
50.32 ms | 503 KiB | 3 Q