xref: /PHP-7.4/Zend/tests/bug42817.phpt (revision e97d5fab)
1--TEST--
2Bug #42817 (clone() on a non-object does not result in a fatal error)
3--FILE--
4<?php
5$a = clone(null);
6array_push($a->b, $c);
7?>
8--EXPECTF--
9Fatal error: Uncaught Error: __clone method called on non-object in %sbug42817.php:2
10Stack trace:
11#0 {main}
12  thrown in %sbug42817.php on line 2
13