3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "let's create a date object", PHP_EOL; $date = date_create(); echo "it has some public properties!!", PHP_EOL; foreach ($date as $key => $value) { echo $key, ' => ', $value, PHP_EOL; } echo "let's change one of them.. because it is public right", PHP_EOL; $date->date = 'foo'; echo "It works!! Hourra ....", PHP_EOL; echo $date->date, PHP_EOL; echo "Or it does not ...", PHP_EOL; foreach ($date as $key => $value) { echo $key, ' ', $value, PHP_EOL; } echo "Is the public properties really all that public .. And don't get me started on HHVM ???";

preferences:
37.91 ms | 402 KiB | 5 Q