3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['M-am întîlnit ieri cu','fosta mea profă de matematică']; $text = implode(",",$array); // this looks good in db $json = json_encode($array); // this don't and returns error when try to decode later. var_dump($array, json_decode($json));
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
array(2) { [0]=> string(23) "M-am întîlnit ieri cu" [1]=> string(31) "fosta mea profă de matematică" } array(2) { [0]=> string(23) "M-am întîlnit ieri cu" [1]=> string(31) "fosta mea profă de matematică" }

preferences:
124.93 ms | 407 KiB | 5 Q