3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=(object) array('20'=>'abc'); echo $x->{20}; echo "\n"; $GLOBALS[20] = 'bbq'; echo ${20};
Output for 8.1.0 - 8.1.6
abc bbq
Output for 8.0.0 - 8.0.19
abc Warning: Undefined variable $20 in /in/OZ291 on line 10
Output for 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 7.4.27 - 7.4.29
abc Notice: Undefined variable: 20 in /in/OZ291 on line 10
Output for 7.3.32, 7.4.26
abc

preferences:
66.2 ms | 416 KiB | 12 Q