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";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HAPLq
function name:  (null)
number of ops:  47
compiled vars:  !0 = $start, !1 = $fp, !2 = $open, !3 = $block, !4 = $data, !5 = $read
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    4     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII%3D'
          6        SEND_VAL                                                 'r'
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !1, $8
    5     9        INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
    7    13        INIT_FCALL                                               'stream_set_blocking'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 1
         16        DO_ICALL                                                 
    8    17        INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !3, $13
   10    21        INIT_FCALL                                               'fread'
         22        SEND_VAR                                                 !1
         23        SEND_VAL                                                 2048
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !4, $15
   11    26        INIT_FCALL                                               'microtime'
         27        SEND_VAL                                                 <true>
         28        DO_ICALL                                         $17     
         29        ASSIGN                                                   !5, $17
   14    30        SUB                                              ~19     !2, !0
         31        CONCAT                                           ~20     'Open%3A++', ~19
         32        CONCAT                                           ~21     ~20, '%0A'
         33        ECHO                                                     ~21
   16    34        SUB                                              ~22     !3, !2
         35        CONCAT                                           ~23     'Block%3A+', ~22
         36        CONCAT                                           ~24     ~23, '%0A'
         37        ECHO                                                     ~24
   18    38        SUB                                              ~25     !5, !3
         39        CONCAT                                           ~26     'Read%3A++', ~25
         40        CONCAT                                           ~27     ~26, '%0A'
         41        ECHO                                                     ~27
   20    42        STRLEN                                           ~28     !4
         43        CONCAT                                           ~29     'Data+Read%3A+', ~28
         44        CONCAT                                           ~30     ~29, '%0A'
         45        ECHO                                                     ~30
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.37 ms | 1400 KiB | 21 Q