3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = null; if ($x['cats']){ echo 'haha'; } else{ echo 'no'; }

Abusive script

This script was stopped while abusing our resources

Output for 7.4.0 - 7.4.1
Notice: Trying to access array offset on value of type null in /in/68Gle on line 5 no
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.11, 5.5.13 - 5.5.35, 5.5.37 - 5.5.38, 5.6.1 - 5.6.17, 5.6.19 - 5.6.24, 5.6.28, 5.6.34 - 5.6.38, 5.6.40, 7.0.0 - 7.0.3, 7.0.6 - 7.0.15, 7.0.17, 7.0.20 - 7.0.24, 7.0.32 - 7.0.33, 7.1.0, 7.1.2, 7.1.4 - 7.1.6, 7.1.11 - 7.1.12, 7.1.14 - 7.1.17, 7.1.20, 7.1.22 - 7.1.23, 7.1.25 - 7.1.27, 7.1.29, 7.1.31 - 7.1.33, 7.2.9 - 7.2.17, 7.2.19 - 7.2.26, 7.3.3, 7.3.5, 7.3.7 - 7.3.13
no
Output for 5.5.12, 5.5.36, 5.6.0, 5.6.18, 5.6.25 - 5.6.27, 5.6.29 - 5.6.33, 5.6.39, 7.0.4 - 7.0.5, 7.0.16, 7.0.18 - 7.0.19, 7.0.25 - 7.0.31, 7.1.1, 7.1.3, 7.1.7 - 7.1.10, 7.1.13, 7.1.18 - 7.1.19, 7.1.21, 7.1.24, 7.1.28, 7.1.30, 7.2.0 - 7.2.8, 7.2.18, 7.3.0 - 7.3.2, 7.3.4, 7.3.6

Process exited with code 137.

preferences:
256.58 ms | 405 KiB | 325 Q