3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interval = new \DateInterval('PT0S'); $unit = 'h'; $interval->$unit += 0; var_dump($interval->h);
Output for 8.2.28 - 8.2.29, 8.3.5 - 8.3.19, 8.3.21 - 8.3.26, 8.4.5 - 8.4.14
int(0)
Output for 8.3.20

Process exited with code 139.

preferences:
68.41 ms | 406 KiB | 5 Q