3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HiddenClass { private $a = 'valueA'; // how to get it's value ? } $arr = (array) new HiddenClass(); $nodes = $arr[chr(0) . 'HiddenClass' . chr(0) . 'a']; print_r($nodes); ?>
Output for 8.0.10
valueA

preferences:
19.67 ms | 408 KiB | 5 Q