3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 1.5 => 1.5, 1.25 => 1.25, 1.75 => 1.75 ]; var_dump( $a );
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
Deprecated: Implicit conversion from float 1.5 to int loses precision in /in/0EMCM on line 3 Deprecated: Implicit conversion from float 1.25 to int loses precision in /in/0EMCM on line 3 Deprecated: Implicit conversion from float 1.75 to int loses precision in /in/0EMCM on line 3 array(1) { [1]=> float(1.75) }
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30
array(1) { [1]=> float(1.75) }

preferences:
69.08 ms | 407 KiB | 5 Q