3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_thing = "thisismy.image.jpg"; $last_dot = strrpos($my_thing, "."); $ext = substr($my_thing, $last_dot); $string = "MICROSOFT CORP CIK#: 0000789019 (see all company filings)"; $newString = substr($string, 0, strpos($string, " CIK#")); $new_name = substr($my_thing, 0, $last_dot); echo $new_name.$ext;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4boVG
function name:  (null)
number of ops:  31
compiled vars:  !0 = $my_thing, !1 = $last_dot, !2 = $ext, !3 = $string, !4 = $newString, !5 = $new_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'thisismy.image.jpg'
    3     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
    6    11        ASSIGN                                                   !3, 'MICROSOFT+CORP+CIK%23%3A+0000789019+%28see+all+company+filings%29'
    7    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !3
         14        SEND_VAL                                                 0
         15        INIT_FCALL                                               'strpos'
         16        SEND_VAR                                                 !3
         17        SEND_VAL                                                 '+CIK%23'
         18        DO_ICALL                                         $12     
         19        SEND_VAR                                                 $12
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !4, $13
   10    22        INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 0
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $15     
         27        ASSIGN                                                   !5, $15
   11    28        CONCAT                                           ~17     !5, !2
         29        ECHO                                                     ~17
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.16 ms | 1395 KiB | 19 Q