3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ["Content-Type" => "text/plain"]; $o = (object) $a; var_dump($o, $o->{"Content-Type"});
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.12
object(stdClass)#1 (1) { ["Content-Type"]=> string(10) "text/plain" } string(10) "text/plain"

preferences:
52.17 ms | 406 KiB | 5 Q