3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_ext($v = '') { $value = explode( '.', $v ); return $value[count( $value ) - 1]; } echo get_ext('123.jpg.jpeg.php');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JpRcV
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'get_ext'
          1        SEND_VAL                                                 '123.jpg.jpeg.php'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function get_ext:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JpRcV
function name:  get_ext
number of ops:  11
compiled vars:  !0 = $v, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      ''
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    4     6        COUNT                                            ~4      !1
          7        SUB                                              ~5      ~4, 1
          8        FETCH_DIM_R                                      ~6      !1, ~5
          9      > RETURN                                                   ~6
    5    10*     > RETURN                                                   null

End of function get_ext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.78 ms | 1397 KiB | 16 Q