3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = [ "key0" => 0, "key1" => 1, "key2" => 2 ]; var_export( array_combine( array_keys($myArray), array_map('strval', $myArray) ) );
Output for 7.4.0 - 7.4.32, 8.0.1 - 8.0.24, 8.1.0 - 8.1.11
array ( 'key0' => '0', 'key1' => '1', 'key2' => '2', )

preferences:
34.28 ms | 409 KiB | 5 Q