3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Cat { private $count; public function __construct(){ self::$count++; } public function destruct(){ echo "I was destricted"; } } new Cat(); new Cat();
based on B594j
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Access to undeclared static property: Cat::$count in /in/1F8Bb:5 Stack trace: #0 /in/1F8Bb(12): Cat->__construct() #1 {main} thrown in /in/1F8Bb on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Access to undeclared static property: Cat::$count in /in/1F8Bb on line 5
Process exited with code 255.