- Output for 8.1.0 - 8.1.6
- Side effect!
- Output for 7.4.0 - 7.4.29, 8.0.1 - 8.0.19
- Fatal error: Constant expression contains invalid operations in /in/MSWi0 on line 9
Process exited with code 255.
<?php
class Foo {
public function __construct() {
echo "Side effect!\n";
}
}
const C = new Foo();