1--TEST-- 2Access to typed static properties before initialization 3--FILE-- 4<?php 5 6class Test { 7 public static int $a; 8 protected static int $b; 9 private static int $c; 10 11 static function run() { 12 try { 13 self::$a; 14 } catch (Error $e) { 15 echo $e->getMessage(), "\n"; 16 } 17 try { 18 self::$b; 19 } catch (Error $e) { 20 echo $e->getMessage(), "\n"; 21 } 22 try { 23 self::$c; 24 } catch (Error $e) { 25 echo $e->getMessage(), "\n"; 26 } 27 } 28} 29 30Test::run(); 31 32?> 33--EXPECT-- 34Typed static property Test::$a must not be accessed before initialization 35Typed static property Test::$b must not be accessed before initialization 36Typed static property Test::$c must not be accessed before initialization 37