3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class SelectTree { protected int $minLength = 15; } class CustomSelectTree extends SelectTree { protected $minLength = 20; }
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.5
Fatal error: Type of CustomSelectTree::$minLength must be int (as in class SelectTree) in /in/Sprt9 on line 11
Process exited with code 255.
Output for 7.4.1 - 7.4.33, 8.0.0 - 8.0.18
Fatal error: Type of CustomSelectTree::$minLength must be int (as in class SelectTree) in /in/Sprt9 on line 14
Process exited with code 255.
Output for 7.4.0
Fatal error: Type of CustomSelectTree::$ must be int (as in class SelectTree) in /in/Sprt9 on line 14
Process exited with code 255.

preferences:
18.9 ms | 1170 KiB | 5 Q