3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = 'monkeyskunk.kmzzrd'; $extensionIndex = strrpos($filename, '.'); $extension = substr($filename, $extensionIndex + 1); $title = substr($filename, 0, $extensionIndex); print_r($extension . "\n"); print_r($title . "\n"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kt1k
function name:  (null)
number of ops:  27
compiled vars:  !0 = $filename, !1 = $extensionIndex, !2 = $extension, !3 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'monkeyskunk.kmzzrd'
    3     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        ADD                                              ~7      !1, 1
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !2, $8
    5    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 0
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
    6    18        INIT_FCALL                                               'print_r'
         19        CONCAT                                           ~12     !2, '%0A'
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                                 
    7    22        INIT_FCALL                                               'print_r'
         23        CONCAT                                           ~14     !3, '%0A'
         24        SEND_VAL                                                 ~14
         25        DO_ICALL                                                 
    8    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.66 ms | 1395 KiB | 19 Q