3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "[{'test':'1', 'anothertest':'2'}, {'test':'3', 'anothertest':'4'}]"; $string = str_replace("'",'"', $string); print_r(json_decode($string,true));

preferences:
94.49 ms | 1285 KiB | 5 Q