3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime( true ); $fp = fopen('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=', 'r' ); $open = microtime( true ); stream_set_blocking( $fp, 1 ); $block = microtime( true ); $data = fread( $fp, 2048 ); $read = microtime( true ); // the time taken to open the url echo "Open: " . ($open-$start) . "\n"; // the time taken to set the stream to blocking echo "Block: " . ($block-$open) . "\n"; // the time taken to read from the the stream echo "Read: " . ($read-$block) . "\n"; // the amount of data read echo "Data Read: " . strlen( $data ) . "\n";

preferences:
32.06 ms | 402 KiB | 5 Q