3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump($x = fopen("data:text/plain,trololololo", 'r+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n"; var_dump($x = fopen("data:text/plain,trololololo", 'w+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n"; var_dump($x = fopen("data:text/plain,trololololo", 'a+')); var_dump(fwrite($x, '123'), rewind($x)); var_dump(stream_get_contents($x)); echo "\r\n";

preferences:
27.62 ms | 408 KiB | 5 Q