3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = json_decode('[bar'); // many lines of code. $bar = json_encode('Hello world!', JSON_THROW_ON_ERROR); if (json_last_error() !== JSON_ERROR_NONE) { throw new Exception("encoding went wrong!"); } echo "All is fine";

preferences:
24.08 ms | 406 KiB | 5 Q