3v4l.org

run code in 300+ PHP versions simultaneously
<?php $img_src = "http://www.keenthemes.com/preview/conquer/assets/plugins/jcrop/demos/demo_files/image1.jpg"; $imgbinary = fread(fopen($img_src, "r"), filesize($img_src)); $img_str = base64_encode($imgbinary); echo $img_str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W4N3P
function name:  (null)
number of ops:  19
compiled vars:  !0 = $img_src, !1 = $imgbinary, !2 = $img_str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fwww.keenthemes.com%2Fpreview%2Fconquer%2Fassets%2Fplugins%2Fjcrop%2Fdemos%2Fdemo_files%2Fimage1.jpg'
    5     1        INIT_FCALL                                               'fread'
          2        INIT_FCALL                                               'fopen'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'r'
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        INIT_FCALL                                               'filesize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
    6    13        INIT_FCALL                                               'base64_encode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
    7    17        ECHO                                                     !2
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.78 ms | 1395 KiB | 21 Q