1--TEST-- 2Test typed properties int must not be allowed to overflow 3--FILE-- 4<?php 5class Foo { 6 public int $bar = PHP_INT_MAX; 7 8 public function inc() { 9 return ++$this->bar; 10 } 11} 12 13$foo = new Foo(); 14 15try { 16 $foo->inc(); 17} catch (TypeError $e) { 18 echo $e->getMessage(), "\n"; 19} 20?> 21--EXPECT-- 22Cannot increment property Foo::$bar of type int past its maximal value 23