3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = [ '{"FirstName":"John","Title":"","Surname":"Smith"}', '{"FirstName":"Daniel","Title":"","Surname":"Smith"}', ]; foreach ($records as $line) { $record = json_decode($line); echo $record->FirstName . "\n"; // etc }

preferences:
24.19 ms | 404 KiB | 5 Q