3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "http://derp.com/index.html/"; echo rtrim($url, '/') . '<br/>'; $url2 = "http://derp.com/index.html"; echo rtrim($url2, '/') . '<br/>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eQVni
function name:  (null)
number of ops:  15
compiled vars:  !0 = $url, !1 = $url2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fderp.com%2Findex.html%2F'
    4     1        INIT_FCALL                                               'rtrim'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2F'
          4        DO_ICALL                                         $3      
          5        CONCAT                                           ~4      $3, '%3Cbr%2F%3E'
          6        ECHO                                                     ~4
    5     7        ASSIGN                                                   !1, 'http%3A%2F%2Fderp.com%2Findex.html'
    6     8        INIT_FCALL                                               'rtrim'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 '%2F'
         11        DO_ICALL                                         $6      
         12        CONCAT                                           ~7      $6, '%3Cbr%2F%3E'
         13        ECHO                                                     ~7
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163 ms | 1394 KiB | 15 Q