3v4l.org

run code in 300+ PHP versions simultaneously
<?php $word = "mom's'"; echo rtrim($word,"'s") . "\n"; $word = "dad's"; echo rtrim($word,"'s");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1DcbY
function name:  (null)
number of ops:  14
compiled vars:  !0 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'mom%27s%27'
    3     1        INIT_FCALL                                               'rtrim'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%27s'
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      $2, '%0A'
          6        ECHO                                                     ~3
    4     7        ASSIGN                                                   !0, 'dad%27s'
    5     8        INIT_FCALL                                               'rtrim'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 '%27s'
         11        DO_ICALL                                         $5      
         12        ECHO                                                     $5
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.11 ms | 1009 KiB | 14 Q