3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Numeric strings will be converted into an integer:\n"; var_dump(array( 'n-n' => -1, 1 => 1, '1' => '1', '-1' => '-1', '1.1' => '1.1', 's1' => 's1', )); echo "Floating point numbers will be converted into an integer:\n"; var_dump(array( -1 => -1, 0 => 0, 1 => 1, -1.9 => -1.9, 0.9 => 0.9, 1.9 => 1.9 )); echo "Booleans will be converted into an integer:\n"; var_dump(array( 0 => 0, 1 => 1, true => true, false => false, )); echo "NULL will be converted into an empty string:\n"; var_dump(array( '' => '', null => null, ));

preferences:
37.96 ms | 402 KiB | 5 Q