3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Point { public function Point( public float $x = 70.0) {} } $a = new Point(); echo $a->x;
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.24, 7.4.0 - 7.4.12
Parse error: syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) in /in/OG8r1 on line 4
Process exited with code 255.

preferences:
191.58 ms | 1008 KiB | 7 Q