3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAA...'; function getB64Type($str) { return substr($str, 5, strpos($str, ';')-5); } var_dump(getB64Type($str));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rbfXv
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'data%3Aimage%2Fjpeg%3Bbase64%2C%2F9j%2F4AAQSkZJRgABAQAAAQABAA...'
    8     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'getb64type'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getb64type:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rbfXv
function name:  getB64Type
number of ops:  13
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 5
          4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%3B'
          7        DO_ICALL                                         $1      
          8        SUB                                              ~2      $1, 5
          9        SEND_VAL                                                 ~2
         10        DO_ICALL                                         $3      
         11      > RETURN                                                   $3
    7    12*     > RETURN                                                   null

End of function getb64type

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.25 ms | 1397 KiB | 20 Q